Beginner 1. Sql*plus is a product of a number of commands consisting of standard SQL and Oracle Companies
2. How to paste text on the Sql*plus operator interface: Select the text you want to paste, and then press the right key when you left.
3. Just in contact with Oracle, special attention must be paid to the commit order and rollback.
4. Learn about Toad,sql*load,pl*sql and other tools.
5. Generally we are in contact with DDL and DML two kinds of commands.
The following are some commonly used statements that need to be mastered:
1. Display the current connected user
Sql> Show User
2. See which users the system has
Sql> select * from All_users;
3. New user and authorize
Sql> create User a identified by A; (default is built under System tablespace)
Sql> Grant Connect,resource to A;
4. Connect to New User
Sql> Conn a/a
5. Query all objects under current user
Sql> select * from tab;
6, establish the first table
Sql> CREATE Table A (a number);
7. Query table structure
Sql> desc A
8. Insert new record
Sql> INSERT into a values (1);
9. Inquiry record
Sql> select * from A;
10, change the record
sql> update a set a=2;
11, delete the record
Sql> Delete from A;
12. Roll Back
Sql> roll;
sql> rollback;
13. Submit
Sql> commit;
14. Exit
Sql> exit;
Sql> quit;
15. List the command statements in memory
Sql> list;
16. Save the current buffer command to file
Sql> select * from A;
Sql> save C:\filename;
17, get the command file read to the buffer
Sql> get c:\filename;
20. Set up automatic commit
Sql> set autocommit on;
21, pseudo-table dual
Sql> Select To_char (sysdate, ' yyyy.mm.dd hh24:mi:ss ') from DUAL;
Sql> select 500+500*0.1+500/100 from DUAL;
These are some of the more commonly used statements, should be skilled grasp is, there are some not commonly used, you can use the time to check their own.
Next you should learn the data type, and you can choose the appropriate type and size for the field when you create the table.
As well as primary keys, foreign keys, unique keys, non-null keys, default values, etc. .....
Come on!!!
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