sqlÖÐÓÃ[]µÄÔÒò
¼Ó[ ]ÓÃÓÚ¶¨½çÁÐÃû»ò±íÃûµÈÐÅÏ¢£¬ÒÔÇø±ðһЩÌØÊâµÄ²»ºÏÃüÃû¹æÔòµÄ×Ö´®£¬»òÊÇÓëϵͳ±£Áô×ÖÓгåÍ»¡£Èç"user"ÊÇSQL Server±£ÁôµÄ¹Ø¼ü×Ö£¬ËùÒÔÓÃ"select * from user"²éѯ»áÌáʾÓï·¨´íÎó¡£¼ÓÉÏÖÐÀ¨ºÅ£¬ÒÔÉùÃ÷Æä²»ÊDZ£Áô×Ö¡£ "select * from [user]" Èç¹û±íÃû²»Êǹؼü×Ö£¬ÈçCompany£¬ÔòÓÃ"select * from Company"ÊÇûÎÊÌâµÄ£¬²»ÓüÓÖÐÀ¨ºÅ,µ±È»×îºÃµÄ°ì·¨ÊDZíÃûͳͳ¼Ó·½À¨ºÅ [] ÀïµÄÄÚÈݱíʾÊÇÒ»¸öÓû§¼¶µÄ±äÁ¿. Ä¿µÄÊÇ·ÀÖ¹Óû§Ê¹ÓõÄÃû³ÆºÍϵͳ±£Áô×Ö³åÍ»±ÈÈçÄãÓÐÒ»¸ö±íÃû¾Í½Ðselect ÄÇôÄã select * from select¿Ï¶¨ÊDz»ÐеÄ. µ«ÊÇÄãselect * from [select] ¾ÍûÎÊÌâÁËÄãÄǸö userÒ²ÊÇÒ»Ñù. ËùÓеıíÃû×Ö¶ÎÃû¶¼¿ÉÒÔ¼Ó[],µ«ÊÇÖ»Òª²»¸úϵͳ¹Ø¼ü×Ö³åÍ»¾Í¿ÉÒÔÊ¡ÂÔ
Ïà¹ØÎĵµ£º
1. ³ÌÐòÈçÏ£º
string str = "Create Database " + "DBname";
string con = "Data Source=10.0.0.249\\sql2005;Initial Catalog=master;Persist Security Info=True;User ID=sa;Password=sa";
&n ......
º¯ÊýÒÀÀµ
==========================================
Ò»¡¢º¯ÊýÒÀÀµ¸ÅÄî
¡¡¡¡º¯ÊýÒÀÀµÊÇ´ÓÊýѧ½Ç¶ÈÀ´¶¨ÒåµÄ£¬ÔÚ¹ØϵÖÐÓÃÀ´¿Ì»¹Øϵ¸÷ÊôÐÔÖ®¼äÏ໥ÖÆÔ¼¶øÓÖÏ໥ÒÀÀµµÄÇé¿ö¡£º¯ÊýÒÀÀµÆÕ±é´æÔÚÓÚÏÖʵÉú»îÖУ¬±ÈÈ磬ÃèÊöÒ»¸öѧÉúµÄ¹Øϵ£¬¿ÉÒÔÓÐѧºÅ¡¢ÐÕÃû¡¢ËùÔÚϵµÈ¶à¸öÊôÐÔ£ ......
SQL SERVER 2008 ¸ü¸Ä¸ú×Ù
/*
¿´Ê飬¿´Áª»úÆڼ䡣¡£¡£Ë³´ø°Ñ¿´µ½µÄдÏÂ
ÓëSQL SERVER 2008 CDC Òì²½²¶»ñÊý¾Ý±ä¸üµÄ²»Í¬,¸ü¸Ä¸ú×ÙÊÇͬ²½½ø³Ì,
ÊÇDML(INSERT/UPDATE/DELETE)ÊÂÎñµÄÒ»²¿·Ö,Ëü¿ÉÒÔʹÓÃ×îСµÄCÅÌ´æ´¢
¿ªÏúÀ´Õì²âÊý¾ÝÐеľ»±ä¸ü.ÄÇôËüÒ²¾Í²»ÄÜÏñCDCÄÇÑù¿ÉÒÔÌṩÓû§±íµÄ
ÀúÊ·¸ü¸ÄÐÅÏ¢. ¸ü¸ÄÊÇʹÓÃÒ ......
SQL ServerȨÏÞ¹ÜÀí²ßÂÔ
Êý¾Ý¿â½¨Á¢Ö®ºó£¬Êý¾ÝµÄ°²È«¾ÍÏÔµÃÓÈΪÖØÒª£¬¶ÔÓÚÒ»¸öÊý¾Ý¿â¹ÜÀíÔ±À´Ëµ£¬°²È«ÐÔ¾ÍÒâζ×ÅËû±ØÐë±£Ö¤ÄÇЩ¾ßÓÐÌØÊâÊý¾Ý·ÃÎÊȨÏÞµÄÓû§Äܹ»µÇ¼µ½SQL Server£¬²¢ÇÒÄܹ»·ÃÎÊÊý¾ÝÒÔ¼°¶ÔÊý¾Ý¿â¶ÔÏóʵʩ¸÷ÖÖȨÏÞ·¶Î§ÄڵIJÙ×÷£»Í¬Ê±£¬Ëû»¹Òª·ÀÖ¹ËùÓеķÇÊÚȨÓû§µÄ·Ç·¨²Ù×÷¡£Õý»ùÓÚ´Ë£¬SQL Server 2000ÌṩÁ ......
sqlͳ¼Æ£¹ØÓÚѧÉú³É¼¨(´ð°¸)
http://blog.sina.com.cn/s/blog_61380b320100ej9p.html
´ð°¸£º
1. ¼ÆËãÿ¸öÈ˵Ä×ܳɼ¨²¢ÅÅÃû
select name,sum(score) as allscore from stuscore group by name order by allscore
2. &nbs ......