sql表數(shù)據導入另一個表 SQL語句,怎么把一個表的數(shù)據復制到另外一個表里面?
SQL語句,怎么把一個表的數(shù)據復制到另外一個表里面?1. 將舊表的數(shù)據復制到新表中(假設兩個表的結構相同)insert into new table select*from the old table
SQL語句,怎么把一個表的數(shù)據復制到另外一個表里面?
1. 將舊表的數(shù)據復制到新表中(假設兩個表的結構相同)insert into new table select*from the old table
2。將舊表的數(shù)據復制到新表(假設兩個表的結構不同)插入新表(字段1,字段2,…)選擇字段1,字段2,。。。。。。從舊桌子上取下來
3。將表結構和數(shù)據復制到新表select*into target table name from Source table name(目標表不存在,因為插入時會自動創(chuàng)建)
4。只將表結構復制到新表create table new table select*from old table where 1=2,也就是說,讓where條件不成立