SQL´¥·¢Æ÷ʵÀý1
¶¨Ò壺 ºÎΪ´¥·¢Æ÷£¿ÔÚSQL ServerÀïÃæÒ²¾ÍÊǶÔijһ¸ö±íµÄÒ»¶¨µÄ²Ù×÷£¬´¥·¢Ä³ÖÖÌõ¼þ£¬´Ó¶øÖ´ÐеÄÒ»¶Î³ÌÐò¡£´¥·¢Æ÷ÊÇÒ»¸öÌØÊâµÄ´æ´¢¹ý³Ì¡£
³£¼ûµÄ´¥·¢Æ÷ÓÐÈýÖÖ£º·Ö±ðÓ¦ÓÃÓÚInsert , Update , Delete ʼþ¡£
ÎÒΪʲôҪʹÓô¥·¢Æ÷£¿±ÈÈ磬ÕâôÁ½¸ö±í£º
Create Table Student( --ѧÉú±í
StudentID int primary key, --ѧºÅ
....
)
Create Table BorrowRecord( --ѧÉú½èÊé¼Ç¼±í
BorrowRecord int identity(1,1), --Á÷Ë®ºÅ
StudentID int , --ѧºÅ
BorrowDate datetime, --½è³öʱ¼ä
ReturnDAte Datetime, --¹é»¹Ê±¼ä
...
)
Óõ½µÄ¹¦ÄÜÓÐ:
1.Èç¹ûÎÒ¸ü¸ÄÁËѧÉúµÄѧºÅ,ÎÒÏ£ÍûËûµÄ½èÊé¼Ç¼ÈÔÈ»ÓëÕâ¸öѧÉúÏà¹Ø(Ò²¾ÍÊÇͬʱ¸ü¸Ä½èÊé¼Ç¼±íµÄѧºÅ);
2.Èç¹û¸ÃѧÉúÒѾ±ÏÒµ£¬ÎÒÏ£Íûɾ³ýËûµÄѧºÅµÄͬʱ£¬Ò²É¾³ýËüµÄ½èÊé¼Ç¼¡£
µÈµÈ¡£
Õâʱºò¿ÉÒÔÓõ½
Ïà¹ØÎĵµ£º
½ñÌì¸ãµÄ£¬°ïͬʲéѯÊý¾Ý£¬ÏÈд¸ö´¥·¢Æ÷£¬½ØÈ¡http://www.chinaroyalgroup.cn/aspnet_client/system_web/2_0_50727/dispbbs.asp?boardid=1&id=836ÀïµÄÓòÃû
IF EXISTS (SELECT name from sysobjects
WHERE name = 'gs_MySub' AND type = 'P')
DROP PROCEDURE gs_MySub
......
SQL SERVER 2005 ¼ò½é
Ò»Ö±ÒÔÀ´£¬T-SQL¶¼ÊÇÈÝÒ×ÉÏÊֵĽṹ»¯²éѯÓïÑÔ£¬Ëæ×ÅSQL ServerµÄ°æ±¾Ñݽø£¬³ýÁËÄÚ²¿¹¦ÄÜÔö¼Ó£¬
T-SQLÒ²´ó·ùÀ©ÔöÁËеIJéѯָÁî¡£ÀýÈ磺XQuery¡¢È¡µÃÅÅÃû˳ÐòµÄº¯Êý¡¢¼¯ºÏÔËËã´îÅäOVERÔËËã·û¡¢TOPÔËËã·û¿ÉÒÔ´îÅä±äÁ¿»ò×Ó²éѯ£¬ÒÔ¼°Í ......
MySQLÖÐÎIJο¼ÊÖ²á- 7 MySQL ÓïÑԲο¼
<!--
body { font-size: 9pt; }
a:hover{color:red;}
a.t1:visited{color:red;}
-->
DATABASE()
·µ»Øµ±Ç°µÄÊý¾Ý¿âÃû×Ö¡£
mysql> select DATABASE();
-> 'test'
Èç¹ûûÓе±Ç°µÄÊý¾Ý¿â£¬DATABASE()
·µ»Ø¿Õ×Ö·û´®¡£
USER()
¡¡
SYSTEM_USER()
......
½ñÌìÊÔÑéʹÓÃpythonÁ¬½Ó sql server ·þÎñÆ÷¡£ÎҼǵÃÒÔǰʹÓÃadoÁ¬½Óaccess·Ç³£Ë³Àû£¬µ«ÊǽñÌìʹÓÃadoÁ¬½Ósql server¾¹È»²»³É¹¦¡£ÔÚpythonÀïÃæµÄ³ö´íÐÅÏ¢¶¼ÏÔʾΪתÒÆÐòÁУ¬·ÑÁË°ëÌì¾¢²Å¸ãÃ÷°×£ºÎÞЧµÄÀà±ð×Ö·û´®¡£
ÊÇÁ¬½Ó×Ö·û´®Â𣿲âÊÔÁ˺ü¸¸ö È·ÈÏÎÞÎóµÄÊý¾Ý¿âÁ¬½Ó×Ö·û´®£¬Ò²ÊÇÈç´Ë ¡£ÉÏÍøËÑË÷£¬ÊÇÓпÉÄÜÊÇ comµÄÀà±ð×Ö ......
< type="text/javascript">
< type="text/javascript">
ÈçתÔØ£¬Çë×¢Ã÷³ö´¦£ºhttp://blog.csdn.net/robinson_0612/archive/2009/11/07/4783702.aspx
Ëæ×ŵ±½ñÊý¾Ý¿âµÄÈÝÁ¿Ô½À´Ô½¿ìµÄ³¯×ÅÔÚ´óÐÍÊý¾Ý¿â»ò³¬´óÐÍÊý¾Ý¿âµÄ·¢Õ¹£¬¶ÔÓÚÊý¾Ý¿âÖеĴóÐͱíÒÔ¼°¾ßÓи÷ÖÖ·ÃÎÊģʽµÄ±íµÄ¿ÉÉìËõÐ ......