常用的SQL指令如下:
SELECT <attribute and function list>
FROM <table list>
[WHERE <condition>]
[GROUP BY <grouping attribute>]
[HAVING <group condition>]
[ORDOR BY <attribute>]
Aggreagte Function in SQL
COUNT(*), COUNT (DISTINCT *), AVG(*), SUM(*), MAX(*), MIN(*)
EXISTS, NOT EXISTS Funciton in SQL
SELECT
FROM
WHERE EXISTS (........有值=True)
SELECT
FROM
WHERE NOT EXISTS (.........無值=Ture)
全站熱搜