insert into table 插入多条数据
2009-11-05 14:29
267 查看
方法1:
insert into `ttt`
select '001','语文' union all
select '002','数学' union all
select '003','英语';
方法2:
INSERT INTO tab_comp VALUES(item1, price1, qty1),
(item2, price2, qty2),
(item3, price3, qty3);
方法3:
INSERT INTO tab_comp(item1, price1, qty1) SELECT item1, price1, qty1 FROM tab_cc;
insert into `ttt`
select '001','语文' union all
select '002','数学' union all
select '003','英语';
方法2:
INSERT INTO tab_comp VALUES(item1, price1, qty1),
(item2, price2, qty2),
(item3, price3, qty3);
方法3:
INSERT INTO tab_comp(item1, price1, qty1) SELECT item1, price1, qty1 FROM tab_cc;
相关文章推荐
- insert into table 插入多条数据
- insert into table 插入多条数据
- insert into table 插入多条数据
- insert into table 插入多条数据
- insert into table 插入多条数据
- Medoo Insert的使用:插入数据
- mysql 使用select插入多条数据,insert into (1,2,3,4,)select(1,2,3,4)
- 解决Hibernate JPA中insert插入数据后自动执行select last_insert_id()
- insert 插入数据
- [原创,转载请注明来源]android中sqlite数据库的中文数据的插入(insert)和查询(select)
- 使用insert 语句插入另一个表和几个传入数据时,写法:
- 数据算法之二叉树插入(BinaryTreeL Insert)的Java实现
- CI框架 insert_batch方法 返回-1,插入的数据不全
- PHP+MySQL之Insert Into数据插入用法分析
- PHP+MySQL之Insert Into数据插入用法分析
- mybatis 做 insert操作的时候返回插入的那条数据的id
- Oracle实现数据不存在则插入,数据存在则更新(insert or update)
- mysql函数之六:mysql插入数据后返回自增ID的方法,last_insert_id(),selectkey
- MySQL命令insert into:向表中插入数据(记录)
- 一次Insert插入多条数据的方法