SQL×¢ÈëÕûÀí
£Ó£Ñ£Ì×¢ÈëÊÇ´ÓÕý³£µÄWWW¶Ë¿Ú·ÃÎÊ£¬¶øÇÒ±íÃæ¿´ÆðÀ´¸úÒ»°ãµÄWebÒ³Ãæ·ÃÎÊûʲôÇø±ð£¬ ËùÒÔÄ¿Ç°ÊÐÃæµÄ·À»ðǽ¶¼²»»á¶Ô£Ó£Ñ£Ì×¢Èë·¢³ö¾¯±¨£¬Èç¹û¹ÜÀíԱû²é¿´IISÈÕÖ¾µÄÏ°¹ß£¬¿ÉÄܱ»ÈëÇֺܳ¤Ê±¼ä¶¼²»»á·¢¾õ¡£
Ëæ×ÅB/SģʽӦÓÿª·¢µÄ·¢Õ¹£¬Ê¹ÓÃÕâÖÖģʽ±àдӦÓóÌÐòµÄ³ÌÐòÔ±Ò²Ô½À´Ô½¶à¡£µ«ÊÇÓÉÓÚÕâ¸öÐÐÒµµÄÈëÃÅÃż÷²»¸ß£¬³ÌÐòÔ±µÄˮƽ¼°¾ÑéÒ²²Î²î²»Æ룬Ï൱´óÒ»²¿·Ö³ÌÐòÔ±ÔÚ±àд´úÂëµÄʱºò£¬Ã»ÓжÔÓû§ÊäÈëÊý¾ÝµÄºÏ·¨ÐÔ½øÐÐÅжϣ¬Ê¹Ó¦ÓóÌÐò´æÔÚ°²È«Òþ»¼¡£Óû§¿ÉÒÔÌá½»Ò»¶ÎÊý¾Ý¿â²éѯ´úÂ룬¸ù¾Ý³ÌÐò·µ»ØµÄ½á¹û£¬»ñµÃijЩËûÏëµÃÖªµÄÊý¾Ý£¬Õâ¾ÍÊÇËùνµÄSQL Injection£¬¼´SQL×¢Èë¡£
SQL×¢ÈëÊÇ´ÓÕý³£µÄWWW¶Ë¿Ú·ÃÎÊ£¬¶øÇÒ±íÃæ¿´ÆðÀ´¸úÒ»°ãµÄWebÒ³Ãæ·ÃÎÊûʲôÇø±ð£¬ËùÒÔÄ¿Ç°ÊÐÃæµÄ·À»ðǽ¶¼²»»á¶ÔSQL×¢Èë·¢³ö¾¯±¨£¬Èç¹û¹ÜÀíԱû²é¿´IISÈÕÖ¾µÄÏ°¹ß£¬¿ÉÄܱ»ÈëÇֺܳ¤Ê±¼ä¶¼²»»á·¢¾õ¡£
µ«ÊÇ£¬SQL×¢ÈëµÄÊÖ·¨Ï൱Áé»î£¬ÔÚ×¢ÈëµÄʱºò»áÅöµ½ºÜ¶àÒâÍâµÄÇé¿ö¡£Äܲ»Äܸù¾Ý¾ßÌåÇé¿ö½øÐзÖÎö£¬¹¹ÔìÇÉÃîµÄSQLÓï¾ä£¬´Ó¶ø³É¹¦»ñÈ¡ÏëÒªµÄÊý¾Ý£¬ÊǸßÊÖÓ듲ËÄñ”µÄ¸ù±¾Çø±ð¡£
SQL×¢È멶´È«½Ó´¥--ÈëÃÅƪ
SQL×¢ÈëÊÇ´ÓÕý³£µÄWWW¶Ë¿Ú·ÃÎÊ£¬¶øÇÒ±íÃæ¿´ÆðÀ´¸úÒ»°ãµÄWebÒ³Ãæ·ÃÎÊûʲôÇø±ð£¬ËùÒÔÄ¿Ç°ÊÐÃæµÄ·À»ðǽ¶¼²»»á¶ÔSQL×¢Èë·¢³ö¾¯±¨£¬Èç¹û¹ÜÀíԱû²é¿´IISÈÕÖ¾µÄÏ°¹ß£¬¿ÉÄܱ»ÈëÇֺܳ¤Ê±¼ä¶¼²»»á·¢¾õ¡£
ÏêϸÄÚÈÝ>>
http://blog.csdn.net/wufeng4552/archive/2008/12/05/3449834.aspx
SQL×¢È멶´È«½Ó´¥--½ø½×ƪ
SQL×¢ÈëµÄÒ»°ã²½Ö裬Ê×ÏÈ£¬Åжϻ·¾³£¬Ñ°ÕÒ×¢Èëµã£¬ÅжÏÊý¾Ý¿âÀàÐÍ£¬Æä´Î£¬¸ù¾Ý×¢Èë²ÎÊýÀàÐÍ£¬ÔÚÄÔº£ÖÐÖع¹SQLÓï¾äµÄÔò¡£
ÏêϸÄÚÈÝ>>
http://blog.csdn.net/wufeng4552/archive/2008/12/05/3449870.aspx
SQL×¢È멶´È«½Ó´¥--¸ß¼¶Æª
¿´ÍêÈëÃÅƪºÍ½ø½×ƪºó£¬ÉÔ¼ÓÁ·Ï°£¬ÆƽâÒ»°ãµÄÍøÕ¾ÊÇûÎÊÌâÁË¡£µ«Èç¹ûÅöµ½±íÃûÁÐÃû²Â²»µ½£¬»ò³ÌÐò×÷Õß¹ýÂËÁËһЩÌØÊâ×Ö·û£¬ÔõôÌá¸ß×¢ÈëµÄ³É¹¦ÂÊ£¿ÔõôÑùÌá¸ß²Â½âЧÂÊ£¿
ÏêϸÄÚÈÝ>>
http://blog.csdn.net/wufeng4552/archive/2008/12/05/3449883.aspx
SQL×¢Èë·¨¹¥»÷Ò»ÈÕͨ
SQL×¢ÈëµÄ¼òµ¥ÔÀíºÍ¹¥»÷Ò»°ã²½Ö裬ÎÄÕÂ×÷ÕßÏëÈÃÈËÒ»Ììѧ»áSQL×¢Èë¹¥»÷¡£
ÏêϸÄÚÈÝ>>
http://blog.csdn.net/wufeng4552/archive/2008/12/05/3449901.aspx
SQL ServerÓ¦ÓóÌÐòÖеĸ߼¶SQL×¢Èë
Õâ·ÝÎĵµÊÇÏêϸÌÖÂÛSQL×¢Èë¼¼Êõ£¬ËüÊÊÓ¦ÓڱȽÏÁ÷ÐеÄIIS+ASP+SQLSERVERƽ̨¡£ËüÌÖÂÛÁËÄÄЩSQLÓï¾äÄÜͨ¹ý¸÷ÖÖ¸÷
Ïà¹ØÎĵµ£º
Óï¾ä¼°²éѯ½á¹û£º
SELECT CONVERT(varchar(100), GETDATE(), 0): 05 16 2006 10:57AM
SELECT CONVERT(varchar(100), GETDATE(), 1): 05/16/06
SELECT CONVERT(varchar(100), GETDATE(), 2): 06.05.16
SELECT CONVERT(varchar(100), GETDATE(), 3): 16/05/06
SELECT CONVERT(varchar(100), GETDATE(), 4): 16.05.06
SE ......
תÔØ×Ô:http://www.diybl.com/course/7_databases/sql/sqlServer/2009124/154621_2.html
Ò»¸öÌâÄ¿Éæ¼°µ½µÄ50¸öSqlÓï¾ä
Student(S#,Sname,Sage,Ssex) ѧÉú±í
Course(C#,Cname,T#) ¿Î³Ì±í
SC(S#,C#,score) ³É¼¨±í
Teacher(T#,Tname) ½Ìʦ±í
ÎÊÌ⣺
1¡¢²éѯ“001”¿Î³Ì±È“002”¿Î³Ì³É¼¨¸ßµÄ ......
1.¡¸¿ªÊ¼¡¹²Ëµ¥->ÔËÐÐ
--Æô¶¯sql server 2005 ·þÎñ
net start mssqlserver
--Í£Ö¹sql server 2005 ·þÎñ
net stop mssqlserver
2.¡¸¿ªÊ¼¡¹²Ëµ¥->³ÌÐò->Microsoft SQL Server 2005->ÅäÖù¤¾ß
SQL Server Configuration Manager->SQL Server(MSSQLSERVER) ÓÒ»÷ Æô¶¯·þÎñ³É¹¦ºó£¬×´Ì¬ÏÔʾΪ“ÕýÔÚÔËÐ ......
create table aaa
(
id int primary key ,
name varchar(30) not null
)
create table bbb
(
id int primary key ,
name varchar(30) not null
)
--½»
select * from aaa
where exists
(
select * from bbb where aaa.id=bbb.id and aaa.name = bbb.name
)
--²î
select *
from bbb
where not exists
(
......
Àí½âSQL SERVERÖÐËùÓÐÕߺͼܹ¹µÄÇø±ð
SQL SERVER2005½éÉÜÁ˼ܹ¹£¬¼Ü¹¹Ïà¶ÔÓÚÒÔÇ°°æ±¾ÖеĶÔÏóËùÓÐÕß¡£±¾ÎĽ«½âÊÍÕâÁ½ÕßµÄÇø±ð£¬²¢Ï£ÍûÄܽ⿪ÄãÖÁ½ñÈԶԼܹ¹Ò»µãÀ§»ó¡£
¶ÔÏóËùÓÐÕß
ÒªÀí½âËùÓÐÕߺͼܹ¹Ö®¼äµÄÇø±ð£¬ÈÃÎÒÃÇÏÈ»¨µãʱ¼äÀ´¸´Ï°Ò»Ï¶ÔÏóµÄËùÓÐȨ¡£ÔÚSQL SERVER2000»òÒÔÇ°°æ±¾Öд´½¨Ò»¸ö¶ÔÏ󣬶ÔÏó±ØÐëÒªÓÐÒ»¸öËù ......