当前位置: 代码迷 >> 综合 >> Sql技巧备忘
  详细解决方案

Sql技巧备忘

热度:61   发布时间:2024-01-16 16:29:53.0

 

1。编程时总是需要生成测试数据,一条两条可以简单的插入数据,有时要插入很多数据时,就显得麻烦。

这里,用insert into table() select方法来做,能够轻易的实现插入多条数据。

 

INSERT INTO dbo.crmo_gg_tj_khwhzl ( ygh, ssjg, ygjs, khwhhgl, bhghs, hghs, lhhs, yxhs, whyf, tjrq, beizhu )   select ygh, ssjg, ygjs, djl, 7, 8, 15, 6, '200807', '200807', 'test' from crmo_gg_tj_khdjl

 

  相关解决方案