Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

sqlÓï¾ä µÃµ½ sql server ±íÖÐÁеÄÀàÐͺÍ˵Ã÷

ͨ¹ý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_Property from sysobjects AS o JOIN syscolumns AS c  ON o.id = c.id LEFT JOIN sysproperties p ON c.id = p.id and c.colid=p.smallid WHERE o.name = 'TableName' ORDER BY c.colid
  2£ºÕë¶Ôsql server 2005£¬ÔÚsql2005ÖУ¬Ê¹Óãºsys.objects,sys.columnsºÍsys.extended_properties±í
    SELECT o.name as table_name,c.name AS col_name,TYPE_NAME(c.user_type_id) AS type_name,isnull(ep.value,'') AS col_Property from sys.objects AS o JOIN sys.columns AS c  ON o.object_id = c.object_id 
LEFT JOIN sys.extended_properties ep ON c.object_id = ep.major_id and c.column_id=ep.minor_id
WHERE o.name = 'TableName' ORDER BY c.column_id


Ïà¹ØÎĵµ£º

º½¿Õ¹«Ë¾¹ÜÀíϵͳ(VC++ ÓëSQL 2005)

ϵͳ»·¾³£ºWindows 7
Èí¼þ»·¾³£ºVisual C++ 2008 SP1 +SQL Server 2005
±¾´ÎÄ¿µÄ£º±àдһ¸öº½¿Õ¹ÜÀíϵͳ
      ÕâÊÇÊý¾Ý¿â¿Î³ÌÉè¼ÆµÄ³É¹û£¬ËäÈ»³É¼¨²»¼Ñ£¬µ«ÊÇ×÷ΪÎÒÓÃVC++ ÒÔÀ´±àдµÄ×î´ó³ÌÐò»¹ÊÇ´«µ½ÍøÉÏ£¬ÒÔ¹©²Î¿¼¡£ÓÃVC++ ×öÊý¾Ý¿âÉè¼Æ²¢²»ÈÝÒ×£¬µ«Ò²²»ÊDz»¿ÉÄÜ¡£ÒÔÏÂÊÇÎҵijÌÐò½çÃ棬ºóÃæ ......

SQL UPDATEµÄÓ÷¨

ÎÒÃÇÓÐʱºò¿ÉÄÜ»áÐèÒªÐ޸ıí¸ñÖеÄ×ÊÁÏ¡£ÔÚÕâ¸öʱºò£¬ÎÒÃǾÍÐèÒªÓõ½ UPDATE Ö¸Áî¡£Õâ¸öÖ¸ÁîµÄÓï·¨ÊÇ£º
UPDATE "±í¸ñÃû"
SET "À¸Î»1" = [ÐÂÖµ]
WHERE {Ìõ¼þ}
×îÈÝÒ×Á˽âÕâ¸öÓï·¨µÄ·½Ê½ÊÇ͸¹ýÒ»¸öÀý×Ó¡£¼ÙÉèÎÒÃÇÓÐÒÔϵıí¸ñ£º
Store_Information ±í¸ñ
store_name
Sales
Date
Los Angeles
$1500
Jan-05-1 ......

asp.net·Àsql×¢Èë

 using (con)
        {
            con.Open();
            String sqltext = "select * from emp where empno=@empno";
      ......

JavaÁ¬½ÓSQL Server 2000

Êý¾Ý¿â²Ù×÷ÏÖÔÚÊÇÏîÄ¿¿ª·¢µÄ¸ù±¾£¬Ñ§Ï°JavaÊ×ÏÈÓ¦¸Ãѧ»áÔõôÑùÁ¬½ÓÊý¾Ý¿â£¬ÓÃJavaÁ¬½ÓÊý¾Ý¿â¿É²»ÏñÓÃDelphiÕâÀ๤¾ßÄÇÑùÉ輸¸öÊôÐÔ¾ÍOK£¬Ëµ¼òµ¥Ò²¼òµ¥£¬Ëµ¸´ÔÓ£¬ÆäʵҲͦ¸´Ôӵģ¬¶øÇÒºÜÂé·³£¬Èç¹ûÊdzõѧ£¬¸ù±¾²»Äܱ£Ö¤µÚÒ»´Î¾ÍÁ¬½Ó³É¹¦£¬ÏÂÃæÒÔSQL Server 2000ΪÀý£¬ËµËµJavaÁ¬½ÓÊý¾Ý¿âµÄ»ù±¾·½·¨£¬Ò²¼Ç¼һÏÂÐĵá£
1¡¢Ï ......

C# »ñÈ¡ SQL·þÎñÆ÷Áбí

#region   µÃµ½ËùÓб¾µØÍøÂçÖпÉʹÓõÄSQL·þÎñÆ÷ÁÐ±í  
  ///   <summary>  
  ///   µÃµ½ËùÓб¾µØÍøÂçÖпÉʹÓõÄSQL·þÎñÆ÷ÁÐ±í  
  ///   </summary>  
  ///   <param   name="p_strServerList">·þÎñÆ÷Áбí</param& ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ