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

SQLÊý¾Ý¿â£ºÒòΪÎļþ×é 'PRIMARY' ÒÑÂúµÄ½â¾ö·½·¨

 1.¼ì²éÄãÊÇ·ñÏÞÖÆÁËÎļþÔö³¤:  
       ÆóÒµ¹ÜÀíÆ÷--ÓÒ¼üÄãµÄÊý¾Ý¿â--ÊôÐÔ--Êý¾ÝÎļþ--¿´¿´ÓÐûÓÐÉèÖÃÎļþµÄ×î´óÖµ  
   
   2.¼ì²éÄãµÄ´ÅÅÌ·ÖÇø¸ñʽ,Èç¹û²»ÊÇNTFS·ÖÇø,Ôò»áÓÐÏÞÖÆ,½«´ÅÅÌ·ÖÇø¸ñʽ¸Ä³ÉNTFS  
   
   3.Èç¹ûÄã²»Ô¸Òâ¸Ä,ÔòΪÄãµÄÊý¾Ý¿âÌí¼ÓÒ»¸öÊý¾ÝÎļþ  
       ÆóÒµ¹ÜÀíÆ÷--ÓÒ¼üÄãµÄÊý¾Ý¿â--ÊôÐÔ--Êý¾ÝÎļþ--Ìí¼ÓÊý¾ÝÎļþ
1.¼ì²éÄãµÄ´ÅÅÌÊ£Óà¿Õ¼äÊÇ·ñ×ã¹»,Èç¹ûûÓдÅÅÌÊ£Óà¿Õ¼ä,ÔòÇåÀí´ÅÅÌ,ÌÚ³ö¿Õ¼ä¡£
2.¼ì²éÄãµÄ´ÅÅÌ·ÖÇø¸ñʽ£ºÈç¹ûÊÇFAT16,ÔòÊý¾ÝÎļþ×î´óÖ»ÄÜÊÇ2G£¬Èç¹ûÊÇFAT32,ÔòÊý¾ÝÎļþ×î´óÖ»ÄÜÊÇ4G£¬¸ÄΪNTFS·ÖÇøÔòûÓÐÕâÖÖÏÞÖÆ¡£
3.¼ì²éÒ»ÏÂÄãÓÐûÓÐÏÞÖÆÊý¾Ý¿âÎļþµÄ´óС£ºÆóÒµ¹ÜÀíÆ÷--ÓÒ¼üÄãµÄÊý¾Ý¿â--ÊôÐÔ--ÎļþÔö³¤ÏÞÖÆ--Èç¹ûÓÐÏÞÖÆ´óС,È¡ÏûÏÞÖÆ¡£
4.¼ì²éÄãµÄSQL°æ±¾,Èç¹ûÄãÓÃMSDE,ÔòÏÞÖÆÁËÊý¾ÝÎļþ×î´óÊÇ2G¡£
5.ÄãÒ²¿ÉÒÔΪ primary ×éÌí¼ÓеÄÊý¾ÝÎļþÀ´½â¾öÕâ¸öÎÊÌâ
    ÆóÒµ¹ÜÀíÆ÷--ÓÒ¼üÄãµÄÊý¾Ý¿â--ÊôÐÔ--Êý¾ÝÎļþ£­Ìí¼ÓÊý¾ÝÎļþ¡£
ʹÓÃSQLÓï¾ä£ºalter database ¿âÃû add file(NAME = Âß¼­ÎļþÃû,FILENAME = 'c:ʵ¼ÊÎļþÃû.ndf'¡£


Ïà¹ØÎĵµ£º

c# SQLÊý¾Ý¿âÔ¶³ÌÁ¬½Ó¼°ÅäÖ÷½·¨

Ò»£ºC# Á¬½ÓSQLÊý¾Ý¿â
Data Source=myServerAddress;Initial Catalog=myDataBase;User Id=myUsername;Password=myPassword;
Data Source=190.190.200.100,1433;Network Library=DBMSSOCN;Initial Catalog=myDataBase;User ID=myUsername;Password=myPassword;
Server=myServerAddress;Database=myDataBase;User ID=myUse ......

sqlÓï¾ä

 1. ˵Ã÷£º¸´ÖƱí(Ö»¸´Öƽṹ£¬Ô´±íÃû£ºa£¬Ð±íÃû£ºb)
SQL: select * into b from a where 1<>1;
        2. ˵Ã÷£º¿½±´±í(¿½±´Êý¾Ý£¬Ô´±íÃû£ºa£¬Ä¿±ê±íÃû£ºb)
SQL: insert into b(a, b, c) select d, e, f from b;
        3. ......

¾«ÃîSQLÓï¾ä

 1.°´ÐÕÊϱʻ­ÅÅÐò:
Select * from TableName Order By CustomerName Collate Chinese_PRC_Stroke_ci_as
2.·ÖÒ³SQLÓï¾ä
select * from(select (row_number() OVER (ORDER BY tab.ID Desc)) as rownum,tab.* from ±íÃû As tab) As t where rownum between ÆðʼλÖà And ½áÊøλÖÃ
3.»ñÈ¡µ±Ç°Êý¾Ý¿âÖеÄËùÓÐÓû§± ......

¶¯Ì¬SQL»ù±¾Óï·¨

1 :ÆÕͨSQLÓï¾ä¿ÉÒÔÓÃexecÖ´ÐÐ
Select * from tableName
exec('select * from tableName')
exec sp_executesql N'select * from tableName' -- Çë×¢Òâ×Ö·û´®Ç°Ò»¶¨Òª¼ÓN
2:×Ö¶ÎÃû£¬±íÃû£¬Êý¾Ý¿âÃûÖ®Àà×÷Ϊ±äÁ¿Ê±£¬±ØÐëÓö¯Ì¬SQL
declare @fname varchar(20)
set @fname = 'FiledName'
Select @fname from tab ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ