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

(Microsoft SQL Server£¬´íÎó: 3219)

MSSQL»¹Ô­Êý¾Ý¿âʧ°Ü£¬ÌáʾÈçÏ£º »¹Ô­¶ÔÓë·þÎñÆ÷ ʧ°Ü¡£(Microsoft.SqlServer.Smo) ÆäËüÐÅÏ¢£º ©§ ©»¡úÖ´ÐÐTransact-SQLÓï¾ä»òÅú´¦Àíʱ·¢ÉúÒì³£¡££¨Microsoft.SqlServer.ConnectionsInfo£© ©§ ©»¡ú²»ÄÜÑ¡ÔñÎļþ»òÎļþ×é¡°¡­¡­¡±ÓÃÓڴ˲Ù×÷¡£ RESTORE DATABASE ÕýÔÚÒì³£ÖÕÖ¹¡££¨Microsoft SQL Server, ´íÎó£º3219£© ³öÏÖ´Ë´íÎóʱÎҵIJÙ×÷²½ÖèΪ£º ÓÒ»÷Êý¾Ý¿â¡·¡·ÈÎÎñ¡·¡·»¹Ô­¡·¡·ÎļþºÍÎļþ×é¡·¡·Ô´É豸£¨Ñ¡Ôñ±¸·ÝÎļþ£©¡·¡·Ö¸¶¨±¸·ÝÎļþλÖá·¡·Ìí¼ÓÑ¡¶¨Îļþ¡£ ÔÚ¡°»¹Ô­ÎļþºÍÎļþ×顱¶Ô»°¿òÖеã»÷¡°È·¶¨¡±°´Å¥£¬¼´³öÏÖÉÏÃæÏÔʾµÄ´íÎó¡£ ÕýÈ·µÄ²½ÖèΪ£º ÓÒ»÷Êý¾Ý¿â¡·¡·ÈÎÎñ¡·¡·»¹Ô­¡·¡·Êý¾Ý¿â¡·¡·Ô´É豸£¨Ñ¡Ôñ±¸·ÝÎļþ£©¡·¡·Ö¸¶¨±¸·ÝÎļþλÖá·¡·Ìí¼ÓÑ¡¶¨Îļþ¡£ ÔÚ¡°»¹Ô­Êý¾Ý¿â¡±¶Ô»°¿òÖеã»÷¡°È·¶¨¡±°´Å¥£¬¼´¿ÉÕýÈ·»¹Ô­¡£ Ö÷ÒªÔ­Òò£º ÎļþºÍÎļþ×鱸·Ý±ØÐë±»»¹Ô­µ½Æ¥ÅäµÄÊý¾Ý¿â »¹Ô­ÎļþºÍÎļþ×鱸·Ý SQL Server µÄ˵Ã÷µÄÏêϸÐÅÏ¢¿É¼û£º http://support.microsoft.com/kb/281122/zh-cn ÖÁÓÚ¡°»¹Ô­Êý¾Ý¿â¡±ºÍ¡°»¹Ô­ÎļþºÍÎļþ×顱µÄÇø±ð¿ÉÒÔ¼û´ËÎÄÕ£ºhttp://www.cnblogs.com/zping/archive/2008/08/21/1272961.html


Ïà¹ØÎĵµ£º

һЩ²»´íµÄsqlÓï¾ä

1¡¢ËµÃ÷£º¸´ÖƱí(Ö»¸´Öƽṹ,Ô´±íÃû£ºa бíÃû£ºb) (Access¿ÉÓÃ)
·¨Ò»£ºselect * into b from a where 1<>1
·¨¶þ£ºselect top 0 * into b from a
2¡¢ËµÃ÷£º¿½±´±í(¿½±´Êý¾Ý,Ô´±íÃû£ºa Ä¿±ê±íÃû£ºb) (Access¿ÉÓÃ)
insert into b(a, b, c) select d,e,f from b;
3¡¢ËµÃ÷£º¿çÊý¾Ý¿âÖ®¼ä±íµÄ¿½±´(¾ßÌåÊý¾ÝʹÓþø¶Ô· ......

¼ÇÒ»¸ö×ÔÈÏΪдµÃÓе㸴ÔÓµÄsqlÓï¾ä

¼ÇÒ»¸ö×ÔÈÏΪдµÃÓе㸴ÔÓµÄsqlÓï¾ä£¬º¬ÒåÊÇ¿ç3ÕűíµÄselect£º
select table_name,column_name,data_type,data_length,data_scale from user_tab_columns where (data_type != 'NUMBER' or data_length != 22 or data_scale != 6) and (table_name,column_name) in (select upper(a.table_name_eng), upper(b.column_name_ ......

Êý¾Ý¿â×Ö¶ÎÀàÐÍ SQL Server

—×Ö·ûÀàÐÍ
Char: ¶¨³¤·ÇUnicodeµÄ×Ö·ûÐÍÊý¾Ý£¬×î´ó³¤¶ÈΪ8000
Varchar:±ä³¤·ÇUnicodeµÄ×Ö·ûÐÍÊý¾Ý£¬×î´ó³¤¶ÈΪ8000
Text(varchar(max)):±ä³¤·ÇUnicodeµÄ×Ö·ûÐÍÊý¾Ý£¬×î´ó³¤¶ÈΪ2G
Nchar:¶¨³¤UnicodeµÄ×Ö·ûÐÍÊý¾Ý£¬×î´ó³¤¶ÈΪ8000
Nvarchar:±ä³¤UnicodeµÄ×Ö·ûÐÍÊý¾Ý£¬×î´ó³¤¶ÈΪ8000
Ntext(nvarchar(max)):± ......

SQL ServerÖÐcaseµÄÓ÷¨

µÚÒ»ÖÖÓ÷¨£º
SELECT (CASE type WHEN 'u' THEN 'Óû§±í' WHEN 's' THEN 'ϵͳ±í' ELSE 'ÆäËû' END) AS TABLEKIND,* from SYSOBJECTS
µÚ¶þÖÐÓ÷¨£º
SELECT (CASE WHEN crdate<'2006-01-01' THEN 'early' WHEN crdate<'2009-01-01' THEN 'nearly' ELSE 'now' END) AS PERIOD,* from SYSOBJECTS ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ