SQL ÐÐÁл¥±äÖ®ÖÕ¼«·½·¨
SQLÖ®ÐÐÁл¥±äÎÊÌâ¡£
Ñ°Ñ°ÃÙÃÙ£¬SQLÐбäÁУ¬ÁбäÐÐÎÊÌâËäÈ»½â¾ö·½°¸Öڶ࣬µ«ÎÞ²»´æÔÚ×Å´úÂ븴ÔÓ£¬ÐÔÄÜÇ·¼ÑµÈÎÊÌâ¡£½ñÓÐÐÒµÃÖª×î¼Ñ½â¾ö·½°¸£¬ºÃ¶«Î÷²»¸Ò¶ÀÏí£¬±Ê¼ÇÖ®£¬ÑÅË×¹²ÉÍ¡£
ʾÀýÊý¾Ý£º£¨¸ÃʾÀýÊý¾ÝÀ´×ÔYHHRÊý¾Ý¿â Performance_Zmonth_Value±í£©
Employee_Id Zmonth Performance_Cd Value
10001 200806 A 2.00
10001 200806 B 2.00
10001 200806 C 2.00
10001 200806 D 2.00
10001 200806 E 2.00
10001 200806 K 0.25
10002 200806 A 1.25
10002 200806 B 2.00 &nb
Ïà¹ØÎĵµ£º
1.oracleɨÃèµÄ˳ÐòΪ´Óϵ½ÉÏ£¬´ÓÓÒµ½×ó
ËùÒÔÎÒÃÇÒª¾¡¿ÉÄܵİÑÊý¾ÝÉٵıí·ÅÔÚºóÃ棬½»²æ±í·ÅÔÚºóÃ棬×îÄܹýÂ˵ÄÌõ¼þ·ÅÔÚºóÃæ
2.²»ÒªÔÚË÷ÒýÉÏʹÓüÆËãºÍnot²Ù×÷·û
Ë÷ÒýÒ»µ©²ÎÓë¼ÆËã»òÊ¹Ó ......
SQL*PLus> desc emp;
Ãû³Æ &nbs ......
SQL´¥·¢Æ÷ʵÀý1
¶¨Ò壺 ºÎΪ´¥·¢Æ÷£¿ÔÚSQL ServerÀïÃæÒ²¾ÍÊǶÔijһ¸ö±íµÄÒ»¶¨µÄ²Ù×÷£¬´¥·¢Ä³ÖÖÌõ¼þ£¬´Ó¶øÖ´ÐеÄÒ»¶Î³ÌÐò¡£´¥·¢Æ÷ÊÇÒ»¸öÌØÊâµÄ´æ´¢¹ý³Ì¡£
³£¼ûµÄ´¥·¢Æ÷ÓÐÈýÖÖ£º·Ö±ðÓ¦ÓÃÓÚInsert , Update , Delete ʼþ¡£
ÎÒΪʲôҪʹÓô¥·¢Æ÷£¿±ÈÈ磬 ......
ÏÂÁÐÓï¾ä²¿·ÖÊÇMssql
Óï¾ä£¬²»¿ÉÒÔÔÚaccess
ÖÐʹÓá£
SQL
·ÖÀࣺ
DDL—
Êý¾Ý¶¨ÒåÓïÑÔ(CREATE
£¬ALTER
£¬DROP
£¬DECLARE)
DML—
Êý¾Ý²Ù×ÝÓïÑÔ(SELECT
£¬DELETE
£¬UPDATE
£¬INSERT)
DCL—
Êý¾Ý¿ØÖÆÓïÑÔ(GRANT
£¬REVOKE
£¬COMMIT
£¬ROLLBACK)
Ê×ÏÈ,
¼òÒª½éÉÜ»ù´¡Óï¾ä£º
1
¡¢ËµÃ÷£º ......
1 £¬¶ÔÓÚÈÕÆÚ×Ö¶Î×Ö¶Î
access±íʾΪ£º#1981-28-12#
SQLSERVER2000±íʾΪ£º''1981-02-12''
2,SQLÓï¾äÇø±ð£¬select ,update ÔÚ¶Ôµ¥±í²Ù×÷ʱ¶¼²î²»¶à£¬
µ«¶à±í²Ù×÷ʱupdateÓï¾äµÄÇø±ðACCESSÓëSQLSERVERÖеÄUpdateÓï¾ä¶Ô±È:
SQLSERVERÖиüжà±íµÄUpdateÓï¾ä:
Update Tab1
SET a.Name = b.Name
from Tab1 a,Tab2 b
Whe ......