¾¡Á¿²»ÒªÆ´´ÕSqlÓï¾ä,ÓòÎÊýÀ´·À×¢Èë
Èç¹ûÊÇÀàËÆ"select * from user where uid="+uid +" and pwd="+pwd ºÜÈÝÒ׳öÎÊÌâ
ʹÓà SQLParamenter
°ÑÄãµÄSQLÓï¾äд³É ÀàËÆ´æ´¢¹ý³Ì
select * from user where uid=@uid and pwd=@pwd
ʹÓÃÕâ¸öSQLÓï¾ä¶¨ÒåΪ SQLCommand ¶ÔÏó È»ºóʹÓà Paramenter ¶ÔÏó°Ñ @*** Ìæ»»Îª Öµ
¾Í¿ÉÒԸ㶨עÈëʽ©¶´ÁË
Ïà¹ØÎĵµ£º
Ò»¡¢ÄÚ²¿º¯Êý
1¡¢ÄÚ²¿ºÏ¼Æº¯Êý
1£©COUNT£¨*£© ·µ»ØÐÐÊý
2£©COUNT£¨DISTINCT COLNAME£©·µ»ØÖ¸¶¨ÁÐÖÐΨһֵµÄ¸öÊý
3£©SUM£¨COLNAME/EXPRESSION£©·µ»ØÖ¸¶¨Áлò±í´ïʽµÄÊýÖµºÍ£»
4£©SUM£¨DISTINCT COLNAME£© ·µ»ØÖ¸¶¨ÁÐÖÐΨһֵµÄºÍ
5£©AVG£¨COLNAME/EXPRESSION£©·µ»ØÖ¸¶¨Áлò±í´ïʽÖеÄÊýֵƽ¾ùÖµ
6£©AV ......
Sql server2005ÓÅ»¯²éѯËÙ¶È51·¨²éѯËÙ¶ÈÂýµÄÔÒòºÜ¶à£¬³£¼ûÈçϼ¸ÖÖ£¬´ó¼Ò¿ÉÒԲο¼Ï¡£
I/OÍÌÍÂÁ¿Ð¡£¬ÐγÉÁËÆ¿¾±Ð§Ó¦¡£
¡¡¡¡Ã»Óд´½¨¼ÆËãÁе¼Ö²éѯ²»ÓÅ»¯¡£
¡¡¡¡ÄÚ´æ²»×ã¡£
¡¡¡¡ÍøÂçËÙ¶ÈÂý¡£
¡¡¡¡²éѯ³öµÄÊý¾ÝÁ¿¹ý´ó(¿ÉÒÔ²ÉÓöà´Î²éѯ£¬ÆäËûµÄ·½·¨½µµÍÊý¾ÝÁ¿)¡£
¡¡¡¡Ëø»òÕßËÀËø(ÕâÒ²ÊDzéѯÂý×î³£¼ûµÄÎÊÌ ......
SQL´¥·¢Æ÷ʵÀý½²½â
2008-10-31 21:06
SQL´¥·¢Æ÷ʵÀý1
¶¨Ò壺 ºÎΪ´¥·¢Æ÷£¿ÔÚSQL ServerÀïÃæÒ²¾ÍÊǶÔijһ¸ö±íµÄÒ»¶¨µÄ²Ù×÷£¬´¥·¢Ä³ÖÖÌõ¼þ£¬´Ó¶øÖ´ÐеÄÒ»¶Î³ÌÐò¡£´¥·¢Æ÷ÊÇÒ»¸öÌØÊâµÄ´æ´¢¹ý³Ì¡£
³£¼ûµÄ´¥·¢Æ÷ÓÐÈýÖÖ£º·Ö±ðÓ¦ÓÃÓÚInsert , Update , Delete ʼþ¡£
&nbs ......
¶ÔÈÕ³£¹¤×÷ÖÐÓõ½µÄ¸Ð¾õÓÐÓõÄsqlÓï¾ä×ö¸ö¹éÄÉ£¬ÓÃÓÚ½ñºóιÊ֪С£
*¸´ÖÆ±í£º
create table tablename as select * from table_src;
create table tablename as select * from table_src where 1 <> 1; --Ö»¸´ÖƱí½á¹¹ ......