Database (2)

Source: Internet
Author: User

Dml

A.insert (insert)
Syntax: INSERT into table name (column name ... Values (Value ...) )
Eg:insert into student (id,name,addr,) values (11,, ' Zhang San ', ' City Houses ');
Note: 1) The column an array and the number of values to be consistent
2) Primary key columns cannot be duplicated
3) Non-empty columns cannot insert null values

1 --User Table2 INSERT  intoQqusers (Qqid,password,lastlogtime,online, Level)VALUES(54789625,'add512#&','2013-02-16 17:01:35',2,1);3 INSERT  intoQqusersVALUES(88662753,'admin0219','2013-02-19 21:08:50',0,5);4 INSERT  intoQqusersVALUES(8855678,'guest0221','2013-02-21 16:28:20',1,6);
Insert Representation Example


B.delete (delete)
Syntax: Delete from table name where condition
Eg:delete from student where id=1;
Note: If there is no where condition, then delete from table name; Delete all records of table

1 -- Delete 2 DELETE  from WHERE EMPNO=;
Delete Information Example


C.update (Modify update)
Syntax: Update table name set column name 1= value 1, column name 2= value 2 ... where condition

1 --  2UPDATESET ename='YY'WHERE EMPNO=.
Modifying a presentation example

Database (2)

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.