Oracle table creation and addition, deletion, modification, and operation commands

Source: Internet
Author: User

Common addition, deletion, and modification operations for creating data tables and data tables

1. Click "Start/Program/Oracle-orahome92/Application Development/SQL plus ";

2. In "user name [u]:" and "password [p]:" Enter the user name and password of system. The default value is system and Manager (or the password set during installation)

3. Create a tablespace "test" with a size of 100 m:

Create tablespace "test ";
Logging;
Datafile 'd:/Oracle/oradata/test/Haig. ora 'size 100 m;

4. create user "test", default tablespace "test ";

Create user "test" Profile "default" identified by "test ";
Default;
Tablespace "test" account unlock;

5. Grant three permissions: unlimited tablespace, connect, resource;

Grant unlimited tablespace, connect, resource to "test ";

6. Log On with the "test" user;

Connect test/test;

1. Create a table;

Create Table count
(
Num1 number (4, 2 ),
Num2 number (5, 2 ),
Result number (6, 2)
);

2. Insert data;

Insert into count (num1, num2, result) values (1, 1, 2 );
Insert into count (num1, num2, result) values (1, 1 );
Insert into count (num1, num2, result) values (2, 8, 10 );
Insert into count (num1, num2, result) values (158 );

3. submit data;

Commit;
4. update data;

Updated count set num1 = 100;
5. delete data;

Delete from count;
6. query data;

Select * From count;

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.