Oracle update operation copy TABLE: [SQL] CREATE TABLE myemp AS SELECT * FROM emp; www.2cto.com 1. add data Syntax: [SQL] INSERT INTO tablename [(field name 1 field name 2,...)] VALUES (value 1, value 2 ,...); add a piece of data: Recommended usage:
[SQL] INSERT INTO myemp (empno, ename, job, mgr, hiredate, sal, comm, deptno) VALUES (7899, 'shao Han', 'it personnel ', 7369, '14-August-100', 1995, 40); For numbers, no single quotation marks are required, but the strings must be enclosed in single quotation marks. In addition, you can use the TO_DATE () function to convert data of the string type to data of the DATE type.
[SQL] INSERT INTO myemp (empno, ename, job, hiredate, sal, deptno) VALUES (8888, 'shaohan', 'it personnel ', TO_DATE ('1970-01-16 ', 'yyyy-mm-dd'), 2009); www.2cto.com 2. modify the data UPDATE statement to complete the data modification function. Syntax: modify all: UPDATE table name SET field = new value ...... Modify local: UPDATE table name SET field to be modified = new value ...... WHERE condition modification; 3. DELETE data DELETE: delete all: delete from table name; DELETE partial: delete from table name WHERE condition deletion;