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

mssql Êý¾ÝתÒÆÎÊÌâ

ͬһ̨·þÎñÆ÷£¬ÓÐ2¸öÊý¾Ý¿â£ºAºÍB£¬ÀïÃæµÄ±íÃûÍêÈ«Ò»Ö£¬½á¹¹ÍêÈ«Ò»Ñù£¬AµÄ±íÓÐÄÚÈÝ£¬BµÄ±íÊǿհ׵ġ£

ÏÖÔÚÎÒÐèÒª½«Êý¾Ý´ÓA¸´ÖƵ½B¡£

±¾À´ÎÒ¿ÉÒÔÕâÑù×öµÄ£¬Ñ­»·sysobjects£¬Öð¸ö±í£º
insert into b..table_n select * from a..table_n£¬¾Í¿ÉÒÔÍê³ÉÈÎÎñÁË¡£

¿ÉϧÕâЩ±íÀïÃ棬ÓÐij¼¸¸ö±í°üº¬ÁËidentityÁУ¬ÄÇôÉÏÃæÕâ¸öÓï¾ä»á³ö´í¡£

ÎÒÏÖÔÚÐèÒª ±à³Ì ½â¾öÕâ¸öÎÊÌ⣬ÎÞÂÛʹÓÃdtcÒ²ºÃ£¬bcpÒ²ÐУ¬ÉõÖÁÒ»¸ö±íÒ»¸ö±íÑ­»·¿½±´¶¼¿ÉÒÔ£¬¾ÍÊÇÏëÄܹ»ÊµÏÖÊý¾ÝתÒÆÕâ¸ö¹¦ÄÜ¡£

ÖØÒªµÄÊÇҪʵÏÖ ±í½á¹¹ÎÞ¹ØÐÔ£¬ÒòΪÎÒÖ»ÖªµÀAºÍBµÄ±í½á¹¹ÊǾø¶ÔÒ»Öµģ¬µ«ÊÇÓм¸¸ö±í£¿±í½á¹¹ÈçºÎ£¿ÄÇЩ±íÓÐIDENTITY×ֶΣ¬ÕâЩÐèÒª²éѯµÃµ½µÄ¡£

¾ÍÇë¸ßÊÖ°ï¸ö棡


ÊÇ°¡£¬Ï£ÍûбíµÄ identity ÁеÄÄÚÈݸú¾É±íÒ»Ñù¡£

ÎÒµÄÒâ˼¸úÄã˵µÄÒ»Ñù£¬ÐèÒª±Ü¿ª IDENTITY£¬ÎÊÌâÊÇ
SET IDENTITY_INSERT ? ON
SET IDENTITY_INSERT ? OFF ¿ÉÒÔʵÏÖÂð£¿

ÎÒµÄÊÇMSSQL2000

Ϊʲô²»Ö±½Ó»¹Ô­ÄØ£¬°´Äã˵µÄÁ½¸ö¿â²»ÊǶ¼Ò»ÑùÂð

±í±È½Ï´ó£¬¿¼Âǵ½¿ÉÄÜ¿½±´Ê§°Ü¶øÐèÒªÖØп½±´£¬¿ÉÌáÇ°²âÊÔ±íµÄ¼Í¼Êý¾ö¶¨ÊÇ·ñÒª¿½±´£¬ËùÒÔ²»´òËãʹÓÃMSFOREACHTABLE¡£

set identity_insert xx on
È»ºóinsert¾ÍÊÇ£¬
Óò»ÓÃsp_msforeachtableÊÇÄãµÄÊ¡£


guguda2008

(ÉñѼһ¿¾ÌìÏÂÏã)
Ϊʲô²»Ö±½Ó»¹Ô­ÄØ£¬°´Äã˵µÄÁ½¸ö¿â²»ÊǶ¼Ò»ÑùÂð


Ö±½Ó»¹Ô­ÊÇָʲô£¿È·ÊµÊÇΪÁË2¸ö¿âʵÏÖÒ»Ñù¡£



±¸·ÝÊÇÒ»¸ö·½·¨¡£

Ä¿Ç°ÎÒ¹Ø×¢µÄÊÇ£¬set identity_insert xx on »¹ÊÇ»á³ö´í£¬Ìáʾ£º
¡°½öµ±Ê¹ÓÃÁËÁÐ


Ïà¹ØÎÊ´ð£º

ÈçºÎÔÚMSSQLÊý¾Ýµ¼ÈëµÄʱºòÓöÉÏ´íÎóÊý¾ÝÌø¹ý?

ÈçºÎÔÚMSSQLÊý¾Ýµ¼ÈëµÄʱºòÓöÉÏ´íÎóÊý¾ÝÌø¹ý?
Õâ¸ö£¿ÄÇÄ㻹ÊÇÓÃssis°É¡£Êý¾Ýµ¼Èëµ¼³öûÓпØÖÆÁ÷

ÊÇ2000µÄÊý¾Ý¿â

2000ûʲôºÃµÄ°ì·¨

ÓÐûÓÐÆäËüµÄµ¼È빤¾ßÄØ?

×Ô¼ºÔÚǰ̨д´úÂëÅжϡ£

·¹ý£¬ÓÃÇ°Ì¨Ê ......

¸ßнƸMsSQL DBA - ÉϺ£ - 5+¾­Ñé - Ó¢Óï¿É¹µÍ¨

¸ßнƸMsSQL DBA - ÉϺ£ - 5+¾­Ñé - Ó¢Óï¿É¹µÍ¨
н×Ê20wÒÔÉÏ£¬ÍêÈ«open
..

ºÙºÙ£¬ÓÐÐËȤ¡£

ӦƸ¹ý..µ«ÊÇÓ¢Óï²»¹ý¹Ø...ÓôÃÆËÀÎÒÁË...

Ì«Ô¶

ÍêÈ«open ɶÒâ˼ Ë­¸ø½âÊÍÏÂ

·¹ý£¬¿Éϧ£¬È¥²»ÁË

һР......

ÓÃmssqlÔõÑùʵÏÖÕâÑùµÄЧ¹û

ÏÂÃæÊǼÆË㵱ǰ»ý·ÖµÄsqlÓï¾ä£ºÈç¹û¼Ç¼ΪnullʱÏÔʾ0

select isnull('0',(b.sumpoints - a.usedpoints)) as points

½á¹û£ºËùÓмǼ¶¼ÏÔʾ 0

Èç¹û£º
select (b.sumpoints - a.usedp ......

ƽ°²Ò¹¸øûÊÕµ½ÀñÎïµÄGG &&MM ËÍ·Ö -MSSQL°æ

ƽ°²Ò¹¸øûÊÕµ½ÀñÎïµÄGG &&MM ÎÒÀ´ËÍÀñÎïÀ²¡£
ÊÕµ½ÀñÎïµÄ¾Í±ð½Ó·ÖÁË£¡ÒªÊǽӲ»µ½°Ñ×Ô¼ºµÄ³ôÍà×ÓÄóöÀ´£¬µÈÊ¥µ®ÀÏÈËÍíÉÏËÍÄã°É£¡
SF

bd

sf

À´jfµÄ

²»´©Íà×Ó

JAVA php JS MYSQL C# °æ¶¼·¢Í ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ