1. WHERE對返回的
行進行過濾
2. GROUP BY對保留的行進行分組
3. HAVING對
分組進行過濾

子查詢不能包含ORDER BY

雙引號直接用:'The "Great" Gatsby' (表示字符串 The "Great" Gatsby )
單引號要轉義:'O''Malley' (表示字符串 O'Malley )

?DML
select column1,column2 from table
insert into table(column1,column2) value
s('a','b')
update table set column1='a' where column2='b'
delete from table where column1='a'

--外連接,使用叉積表達有歧義,不運行:查詢中包含不允許的外聯接請求。
select * from a,b,c
??????? where a.a_id*=b.a_id
??????????? and b.b_id*=c.b_id
--這樣就不存在歧義性了
select * from a
??? LEFT OUTER JOIN b on (a.a_id=b.a_id)
??? LEFT OUTER JOIN c on (b.b_id=c.b_id)
posted on 2006-08-23 08:36
Jcat 閱讀(408)
評論(1) 編輯 收藏 所屬分類:
Database