--新增多條記錄
insert
into
tablename(col1,col2,col3)
select
3,4,5
union
allselect
6,7,8
--從另外的一張表中讀取多條資料新增到新錶中
insert
into
tablename(col1,col2,col3)
select a,b,c from
tablea
--從其他的多張表中讀取資料新增到新錶中
insert
into
tablename(col1,col2,col3)
select a,b,c from tablea where a=
1union
allselect a,b,c from tableb where a=2--
上邊**中的into都可以省略!
--上邊**中的union all如果換成union,則相同記錄只插入一次,不會重複插入。
--另外一種方法是sql server2008特有的,所以,如果你不是sql server2008,就不能使用這種方法了。
insert
into mytable(id,name)values(7,'
003'),(8,'
004'),(9,'
005')
新增查詢刪除資料
package demo1 leo description 暫無 date created in 2020 11 27 18 03 public class mylist public mylist object element get set方法 public object getelement ...
鍊錶的新增,查詢,刪除
include include struct node 結點結構體 struct node head null 無結點時指向空 struct node tail null 頭尾指標 建立鍊錶,包括尾新增和頭新增 void addtail int data else tail sta 兩者的結構體是相...
模組的建立和新增,查詢
在visual studio code上的操作 1.建立乙個node modules的資料夾 2.在node modules中建立乙個content.router.js,tag.router.js,user.router.js的js檔案 模組 建立模組 終端 npm install mongoose...