Sql> Conn Scott/tiger
Connected.
Sql> Show user;
USER is "SCOTT"
Sql> CREATE TABLE QQ (name VARCHAR2 (ten), salary number (8,2));Create a table QQ, two segments, name and salary
Table created.
Sql> SELECT * from QQ;Enquiry Form QQ Information
No rows selected
Sql> INSERT INTO QQ (name) VALUES (' Zhangsan ');Specify a queue to insert data, NULL not set
1 row created.
Sql> SELECT * from QQ;
NAME SALARY
---------- ----------
Zhangsan
insert data, try to find, number value 8,2 means, decimal point remains two bits, six bits of integer digits
values2 for character type, man a word for two bytes, English and special characters one, I this man can't show, character Chinese characters in parentheses enclose
Sql> INSERT INTO QQ (salary) values (123456.78);
1 row created.
Sql> SELECT * from QQ;
NAME SALARY
---------- ----------
Zhangsan
123456.78
Sql> INSERT INTO QQ values (' Lisi ', 12345678);
INSERT into QQ values (' Lisi ', 12345678)
*error at line 1:
Ora-01438:value larger than specified precision allowed for this column
Sql> INSERT INTO QQ values (' Lisi ', 5000);
1 row created.
Sql> SELECT * from QQ;
NAME SALARY
---------- ----------
Zhangsan
123456.78
Lisi 5000
Sql> INSERT INTO QQ values (1);
INSERT into QQ VALUES (1)
*error at line 1:
Ora-00947:not enough values
Sql> INSERT INTO QQ (salary) values (11);
1 row created.
Sql> SELECT * from QQ;
NAME SALARY
---------- ----------
Zhangsan
123456.78
Lisi 5000
1
sql> Roll rollback operation
Rollback complete.
Sql> SELECT * from QQ;
No rows selected
1
Beginner oracle,sql,dml Inserting a value into a table