2、sql語句更新:update table1 set field1=value1 where 範圍查詢:select * from table1 where field1 like "%value1%" (所有包含"value1"這個模式的字串)排序:select * from table1 order by field1,field2 [desc]求和:select sum(field1) as sumvalue from table1平均:select avg(field1) as avgvalue from table1最大:select max(field1) as maxvalue from table1最小:select min(field1) as minvalue from table1[separator]
在最後的地方 隨便加個字元, ) a就可以了。缺少一個表名,相當於。具體如下:
1、簡介結構化查詢語言(Structured Query Language)簡稱SQL,結構化查詢語言是一種資料庫查詢和程式設計語言,用於存取資料以及查詢、更新和管理關係資料庫系統;sql 語句就是對資料庫進行操作的一種語言。
2、sql語句更新:update table1 set field1=value1 where 範圍查詢:select * from table1 where field1 like "%value1%" (所有包含"value1"這個模式的字串)排序:select * from table1 order by field1,field2 [desc]求和:select sum(field1) as sumvalue from table1平均:select avg(field1) as avgvalue from table1最大:select max(field1) as maxvalue from table1最小:select min(field1) as minvalue from table1[separator]