4. 犖犖迦牽犢犖犖朽権犖犖犖 SELECT 犢犖犢犢犖犖朽権犖犖犖項犢犖犖÷弦犖ム犖迦検犢犖犖劇犖犖犢犖 Syntax SELECT column_name ( s ) FROM table_name 犢犖犢犖 SELECT Prov_ID, Prov_Name FROM Prov_geo 犖犖犖劇賢 SELECT * FROM Prov_geo 犖犖萎犖犢 select-set 犢犖犢犖 犢犖ム権 3 犖犖犖萎犖伍牽犖 2 犖犖迦犖犖犖犖伍牽犖 1 Prov_Name Prov_ID
5. 犖犖迦牽犢犖犖朽権犖犖犖 SELECT 犢犖犖犖÷元犢犖犖劇犖犖犢犖 犢犖犢犢犖犖朽権犖犖犖項犢犖犖÷弦犖ム犖迦検犢犖犖劇犖犖犢犖 Syntax SELECT column FROM table WHERE column operator value 犢犖犢犖 SELECT * FROM Prov_geo WHERE Prov_ID=2 犖犖犖劇賢 SELECT * FROM Prov_geo WHERE Prov_Name= 犖犖犖萎犖伍牽犖 犖犖萎犖犢 犖犖ム献犖園犖犢犢犖犖÷厳犖犖犖犖園犖犖劇賢 犖犖犖萎犖伍牽犖 2 Prov_Name Prov_ID
6. 犖犖迦牽犖犖犖萎犖 犖犖朽犖犖萎犖伍犖犢犢犖 WHERE If you know the exact value you want to return for at least one of the columns IN Search for a pattern LIKE Between an inclusive range BETWEEN Less than or equal <= Greater than or equal >= Less than < Greater than > Not equal <> Equal =
10. 犖犖迦牽犖ム犖犢犖犖÷弦犖 DELETE 犢犖犢犖ム犖犢犖犖÷弦犖 犢犖犖∇牽犖萎犖伍犢犖犖÷弦犖ム犖犢犖迦見犖÷顕犖∇犖迦検犢犖犖劇犖犖犢犖 Syntax DELETE FROM table_name WHERE column_name = some_value 犢犖犢犖 DELETE FROM Prov_geo WHERE ProvID=2 犖犖萎犖犢犖犖ム献犖園犖犢 select-set 犢犖犢犖 犢犖ム権 3 犖犖犖萎犖伍牽犖 2 犖犖迦犖犖犖犖伍牽犖 1 Prov_Name Prov_ID 犢犖ム権 3 犖犖迦犖犖犖犖伍牽犖 1 Prov_Name Prov_ID
11. 犖犖迦県犖 SQL 犖犖園犖犖犖項 SELECT INTO, CREATE, DataType, DROP, CREAT VIEW, Aggregate Functions, Math Functions, JOIN, Transaction Processing, String Pattern, Data and Time
12. SELECT INTO 犢犖犖劇犖犖犖犢犖迦犖犖迦牽犖迦犢犖犖÷ 犖犖迦犖犖迦牽 SELECT 犖犖朽犢犖犢 SELECT column_name ( s ) INTO newtable [ IN externaldatabase ] FROM source
15. 犖犖犖巌犖犖犖犖犢犖犖÷弦犖 (PostgreSQL 8.3) Bigint int8 Bigserial int8 autoincrementing Boolean bool Character varying [(n)] varchar[(n)] Date Double precision float8 Integer int,int4 signed 4-byte int C
16. 犖犖犖巌犖犖犖犖犢犖犖÷弦犖 (PostgreSQL 8.3) Real float4 single prec. Num Serial serial4 autoincr. 4byte int. Text variable length string Time time of day timestamp
17. 犖犖迦牽犖ム犖迦犖犖巌犖 DROP 犖ム犖犖迦牽犖迦犖犖巌犖 DROP Table_name 犖ム犖犖迦犖犢犖犖÷弦犖ム犖巌犖 DROP Database_name
19. Aggregate Function DISTINCT 犢犖犖劇犖犖犖園犖犖犖犖犢犖犖迦犖犖犖迦鍵犖犖園硯犖犖朽犢犖÷犖犢犖橿検犖迦犖橿犖о犖犢犖 犢犖犢犖 SELECT COUNT (DISTINCT student_name ) FROM student_enroll
20. 犖犖園犖犢犖犖園犖犖犖犖巌犖犖迦肩犖犖犢 Abs absolute value Ceil smallest integer ceil(-42.8) 42 Floor largest integer floor(-42.8) -43 Round(v,s) round v to s dec.places Round(42.4382,2) 42.44 Trunc(v,s) truncate v to s deci.places Trunc(42.4382,2 ) 42.43
21. 犖犖園犖犢犖犖園犖犖犖犖巌犖犖迦肩犖犖犢 Pi() PI value Degrees(dp) rad deg Radians(dp) deg rad Sqrt() 1 arc second (1/3600. degree) = 30 meter Decimal point ~ 5 digit. 100.12345
34. Pattern Matching 犢犖犖劇犖犖犢犖犖犖橿見犖犖園 WHERE 犢犖犖劇犖犖犖迦牽犖犢犖犖犖 string 犖犖朽犖犢犖犖犖犖迦牽 犖犖園硯犖犖犖萎犖橿犖迦牽犢犖犖犖朽権犖犢犖犖朽権犖犢犖犢 LIKE 犖犖園犖犖犖犖朽犢犖犢犢犖犖犖犖項犢犖犖 string 犖犖朽犖犢犖犖犖犖迦牽犖犢犖犖犖迦犖劇賢 % 犖犖犖劇賢 _ 犢犖犖犖朽権犖犢犖犖朽権犖犖犖園 dos command : * 犢犖ム鍵 ? 犖犖迦検犖ム験犖犖園 ILIKE 犖犖橿見犖犖園 case in-sensitive 犖犖迦犢犖ム厳犖犖犖犖劇犖 POSIX Regular Expression
35. 犖犖園硯犖犖∇犖迦 Pattern Matching WHERE Prov_Name LIKE 犖 % 犖犖園犖犖о険犖犖犖朽犖犖謹犖犖犢犖犖犢犖о権 犖 WHERE Prov_Name LIKE % 犖 犖犖園犖犖о険犖犖犖朽犖ム犖犢犖迦権犖犢犖о権 犖 WHERE Prov_Name LIKE _ _ _ 犖犖園犖犖о険犖犖犖朽犖÷元 3 犖犖園硯犖犖園犖犖 WHERE Prov_Name LIKE 犢 _ _ 犖犖園犖犖о険犖犖犖朽犖÷元 3 犖犖園硯犖犖園犖犖 犢犖ム鍵犖犖謹犖犖犢犖犖犢犖о権 犖犖犖萎犖