ʹÓÃsql server·ÖÎöϵͳÈÕÖ¾(תÔØ×Ôneeao.com)
1.·ÖÎöϵͳÈÕÖ¾£¬Ò»ÐÐÒ»Ðп´×ÅʵÔÚÀÛÈË£¬ºÜ¶àÎÞ¹ØÈÕÖ¾£¬ÄܹýÂËϾͺÃÁË¡£Îı¾¹¤¾ß¹¦ÄÜʵÔÚÓÐÏÞ£¬ÓÚÊǺõ£¬½«windowsϵͳÈÕÖ¾µ¼Èësql serverÖУ¬Ö±½ÓsqlÖ®……¡£ÊµÑéÁ˼¸°Ñ£¬×îºÃµÄÊÇ£¬Ö±½Ó½«ÏµÍ³ÈÕÖ¾µ¼³öΪÎı¾µÄ£¬Ö±½Ótab·Ö¸îµÄ£¬µ¼ÈësqlµÄʱºò£º
н¨Êý¾Ý¿â->µ¼ÈëÊý¾Ý->ÏÂÒ»²½->Êý¾ÝÔ´Ñ¡ÔñÎı¾Îļþ->Ñ¡Ôñµ¼³öµÄtxtÎļþ->ÏÂÒ»²½->ĬÈÏÉèÖÃ->ÏÂÒ»²½->Ñ¡ÔñÖƱí·û->ÏÂÒ»²½->Ñ¡ÖÐн¨µÄÊý¾Ý¿â->ÏÂÒ»²½->ÏÂÒ»²½->Íê³É£¬µÈ´ýµ¼Èë°É£¬ÍêÁËÖ±½Ó²éѯ·ÖÎöÆ÷·ÖÎö°É¡£
2.·ÖÎöIISÈÕÖ¾µÄ»°£¬Î¢ÈíÓÐÒ»¸ö²»´íµÄ¹¤¾ß£ºlog Parser,¿ÉÒÔʵÏÖÀàËÆsql²éѯµÄ·½Ê½À´·ÖÎöIISÈÕÖ¾£¬ºÜÊDz»´í¡£
Ïà¹ØÎĵµ£º
create PROCEDURE pagelist
@tablename nvarchar(50),
@fieldname nvarchar(50)='*',
@pagesize int output,--ÿҳÏÔʾ¼Ç¼ÌõÊý
@currentpage int output,--µÚ¼¸Ò³
@orderid nvarchar(50),--Ö÷¼üÅÅÐò
@sort int,--ÅÅÐò·½Ê½£¬1±íʾÉýÐò£¬0±íʾ½µÐòÅÅÁÐ
......
ÍâÀ´¼üÊÇÒ»¸ö(»òÊý¸ö)Ö¸ÏòÁíÍâÒ»¸ö±í¸ñÖ÷¼üµÄÀ¸Î»¡£ÍâÀ´¼üµÄÄ¿µÄÊÇÈ·¶¨×ÊÁϵIJο¼ÍêÕûÐÔ(referential integrity)¡£»»ÑÔÖ®£¬Ö»Óб»×¼ÐíµÄ×ÊÁÏÖµ²Å»á±»´æÈë×ÊÁÏ¿âÄÚ¡£
¾ÙÀýÀ´Ëµ£¬¼ÙÉèÎÒÃÇÓÐÁ½¸ö±í¸ñ£ºÒ»¸ö CUSTOMER ±í¸ñ£¬ÀïÃæ¼Ç¼ÁËËùÓй˿͵Ä×ÊÁÏ£»ÁíÒ»¸ö ORDERS ±í¸ñ£¬ÀïÃæ¼Ç¼ÁËËùÓй˿Ͷ©¹ºµÄ×ÊÁÏ¡£ÔÚÕâÀïµÄÒ»¸öÏÞÖÆ£¬ ......
ÓÐʱºòÎÒÃÇ»á¾ö¶¨ÎÒÃÇÐèÒª´ÓÊý¾Ý¿âÖÐÇå³ýÒ»¸ö±í¸ñ¡£ÊÂʵÉÏ£¬Èç¹ûÎÒÃDz»ÄÜÕâÑù×öµÄ»°£¬Äǽ«»áÊÇÒ»¸öºÜ´óµÄÎÊÌ⣬ÒòΪÊý¾Ý¿â¹ÜÀíʦ (Database Administrator -- DBA) ÊƱØÎÞ·¨¶ÔÊý¾Ý¿â×öÓÐЧÂʵĹÜÀí¡£»¹ºÃ£¬SQL ÓÐÌṩһ¸ö DROP TABLEµÄÓï·¨À´ÈÃÎÒÃÇÇå³ý±í¸ñ¡£ DROP TABLE µÄÓï·¨ÊÇ£º
DROP TABLE "±í¸ñÃû"
ÎÒÃÇÈç¹ûÒªÇå³ ......
using (con)
{
con.Open();
String sqltext = "select * from emp where empno=@empno";
......
ͨ¹ýSqlÓï¾ä»ñµÃ ÁеÄÀàÐͺÍ˵Ã÷:
µÃµ½µÄ±íÍ·£º±íÃû|ÁÐÃû|ÀàÐÍ|˵Ã÷
1£ºÕë¶Ôsql server 2000£¬ÔÚsql2000ÖУ¬Ê¹Óãºsysobjects,syscolumnsºÍsysproperties±í
SELECT o.name as table_name,c.name AS col_name,type_name(c.xtype) AS type_name,isnull(p.value,'') AS col_Pro ......