INSERT

1.插入完整的行

e.g. INSERT INTO customers VALUES('Mary','USA');  要按在表中定义的列的顺序插入

 INSERT INTO customers(cust_name,cust_address) VALUES('Mary','USA');  提供了列名,要按列名插入

2.插入多个行

INSERT INTO customers(cust_name,cust_address)

VALUES('Mary','USA'),

VALUES('Jane','USA');

3.插入检索出的数据

INSERT INTO customers(cust_name,cust_address)

 

SELECT cust_id,cust_name,cust_address

FROM custnew;

posted @ 2017-09-24 19:47  果壳里的星星  阅读(310)  评论(0编辑  收藏  举报