Oracle update operations

Source: Internet
Author: User


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;
 

Related Article

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.