wangxz

导航

SQL 跨数据库更新表

数据库单子被更改了,用原来的备份恢复,只恢复该库中某张表的某张单子。语句如下

 

sp_addlinkedserver '192.168.123.138', 'sql server'

insert into d_Inventorysub(inventoryid,boxid,[clothingid],[styleid],[colorid],[sizeid],[j_cost],[s_price]
      ,[nums],[d_nums],[crdate],[comment], j_price,x_price,discount,Sure_datesub)
select inventoryid,boxid,[clothingid],[styleid],[colorid],[sizeid],[j_cost],[s_price]
      ,[nums],[d_nums],[crdate],[comment], j_price,x_price,discount,Sure_datesub
from [192.168.123.138].clf22_1.dbo.d_inventorysub
where inventoryid='PDd018-2011-08-29-0001'

 

 

 

posted on 2011-09-02 15:35  wangxz  阅读(390)  评论(0)    收藏  举报