oracle SQL·ÖÀà
ORACLE ÖÐSQL Óï¾ä´óÖ¿ÉÒÔ·ÖΪ4´óÀà
1.DQL£¨data quary language Êý¾Ý²éѯÓïÑÔ£©
Êý¾Ý²éѯÓïÑÔDQL»ù±¾½á¹¹ÊÇÓÉSELECT×Ӿ䣬from×Ӿ䣬WHERE×Ó¾ä×é³É
2.DDL£¨data definition language Êý¾Ý¶¨ÒåÓïÑÔ£©
CREATE
ALTER
DROP
RENAME
TRUNCATE
3.DML£¨data manipulation language Êý¾Ý²Ù×ÝÓïÑÔ£©
INSERT
UPDATE
DELETE
MERGE
4.DCL(Data Control Language Êý¾Ý¿ØÖÆÓïÑÔ£©
GRANT
REVOKE
³ýÁËÉÏÃæÕâЩÍ⣬ORACLE½«±¾À´ÊôÓÚDMLÓïÑÔµÄCOMMIT ¡¢ROLLBACK ¡¢SAVEPOINT ¹éÀàΪµ¥¶ÀµÄÂß¼ÊÂÎñ´¦ÀíÓïÑÔÖУ¬ÓÃÀ´¹ÜÀíÓÉDMLÖ´Ðеĸü¸Ä
Ïà¹ØÎĵµ£º
¸ºÔؾùºâÊÇÖ¸Á¬½ÓµÄ¸ºÔؾùºâ¡£RAC
µÄ¸ºÔؾùºâÖ÷ÒªÊÇָлỰÁ¬½Óµ½RACÊý¾Ý¿âʱ£¬ÈçºÎÅж¨
Õâ¸öеÄÁ¬½ÓÒªÁ¬µ½Äĸö½Úµã½øÐй¤×÷¡£ÔÚRACÖУ¬¸ºÔؾùºâ·ÖΪÁ½ÖÖ£¬Ò»ÖÖÊÇ»ùÓÚ¿Í»§¶ËÁ¬½ÓµÄ£¬ÁíÍâÒ»ÖÖÊÇ»ùÓÚ·þÎñÆ÷¶ËµÄ¡£
Ò»¡¢¿Í»§¶Ë¸ºÔؾùºâµÄÅä
ÖÃ
1
¡¢µ±Ç°·þÎñÆ÷ÖеÄÊý¾Ý¿â°æ±¾ÈçÏ£º
SQL> select * from v$version
; ......
BLOBµÄº¬Òå¡¡¡¡
BLOB (binary large object)£¬¶þ½øÖÆ´ó¶ÔÏó£¬ÊÇÒ»¸ö¿ÉÒÔ´æ´¢¶þ½øÖÆÎļþµÄÈÝÆ÷¡£
¡¡¡¡ÔÚ¼ÆËã»úÖУ¬BLOB³£³£ÊÇÊý¾Ý¿âÖÐÓÃÀ´´æ´¢¶þ½øÖÆÎļþµÄ×Ö¶ÎÀàÐÍ¡£
¡¡¡¡BLOBÊÇÒ»¸ö´óÎļþ£¬µäÐ͵ÄBLOBÊÇÒ»ÕÅͼƬ»òÒ»¸öÉùÒôÎļþ£¬ÓÉÓÚËüÃǵijߴ磬±ØÐëʹÓÃÌØÊâµÄ·½Ê½À´´¦Àí£¨ÀýÈ磺ÉÏ´«¡ ......
sql2000º¯Êý´óÈ«1 µ±Ç°ÏµÍ³ÈÕÆÚ¡¢Ê±¼ä
select getdate()
2. dateadd ÔÚÏòÖ¸¶¨ÈÕÆÚ¼ÓÉÏÒ»¶Îʱ¼äµÄ»ù´¡ÉÏ£¬·µ»ØÐ嵀 datetime Öµ
ÀýÈ磺ÏòÈÕÆÚ¼ÓÉÏ2Ìì
select dateadd(day,2,'2004-10-15') --·µ»Ø£º2004-10-17 00:00:00.000
3. datediff ·µ»Ø¿çÁ½¸öÖ¸¶¨ÈÕÆÚµÄÈ ......
ÔÚSQL Server 2005Êý¾Ý¿âÖÐʵÏÖ×Ô¶¯±¸·ÝµÄ¾ßÌå²½Öè:
1¡¢´ò¿ªSQL Server Management Studio
2¡¢Æô¶¯SQL Server´úÀí
3¡¢µã»÷×÷Òµ->н¨×÷Òµ
4¡¢"³£¹æ"ÖÐÊäÈë×÷ÒµµÄÃû³Æ
5¡¢Ð½¨²½Ö裬ÀàÐÍÑ¡T-SQL£¬ÔÚÏÂÃæµÄÃüÁîÖÐÊäÈëÏÂÃæÓï¾ä£¨ºìÉ«²¿·ÖÒª¸ù¾Ý×Ô¼º ......