(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
Ïà¹ØÎĵµ£º
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Óï¾ä£¬º¬ÒåÊÇ¿ç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_ ......
×Ö·ûÀàÐÍ
Char: ¶¨³¤·ÇUnicodeµÄ×Ö·ûÐÍÊý¾Ý£¬×î´ó³¤¶ÈΪ8000
Varchar:±ä³¤·ÇUnicodeµÄ×Ö·ûÐÍÊý¾Ý£¬×î´ó³¤¶ÈΪ8000
Text(varchar(max)):±ä³¤·ÇUnicodeµÄ×Ö·ûÐÍÊý¾Ý£¬×î´ó³¤¶ÈΪ2G
Nchar:¶¨³¤UnicodeµÄ×Ö·ûÐÍÊý¾Ý£¬×î´ó³¤¶ÈΪ8000
Nvarchar:±ä³¤UnicodeµÄ×Ö·ûÐÍÊý¾Ý£¬×î´ó³¤¶ÈΪ8000
Ntext(nvarchar(max)):± ......
µÚÒ»ÖÖÓ÷¨£º
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 ......