(1) 數(shù)據(jù)記錄篩選: sql="select * from 數(shù)據(jù)表 where 字段名=字段值 order by 字段名 [desc]" sql="select * from 數(shù)據(jù)表 where 字段名 like '%字段值%' order by 字段名 [desc]" sql="select top 10 * from 數(shù)據(jù)表 where 字段名 order by 字段名 [desc]" sql="select * from 數(shù)據(jù)表 where 字段名 in ('值1','值2','值3')" sql="select * from 數(shù)據(jù)表 where 字段名 between 值1 and 值2" (2) 更新數(shù)據(jù)記錄: sql="update 數(shù)據(jù)表 set 字段名=字段值 where 條件表達式" sql="update 數(shù)據(jù)表 set 字段1=值1,字段2=值2 …… 字段n=值n where 條件表達式" (3) 刪除數(shù)據(jù)記錄: sql="delete from 數(shù)據(jù)表 where 條件表達式" sql="delete from 數(shù)據(jù)表" (將數(shù)據(jù)表所有記錄刪除) (4) 添加數(shù)據(jù)記錄: sql="insert into 數(shù)據(jù)表 (字段1,字段2,字段3 …) valuess (值1,值2,值3 …)" sql="insert into 目標(biāo)數(shù)據(jù)表 select * from 源數(shù)據(jù)表" (把源數(shù)據(jù)表的記錄添加到目標(biāo)數(shù)據(jù)表) |
|
來自: 昵稱JCz1a > 《學(xué)習(xí)》