/****** Script for SelectTopNRows command from SSMS  ******/
insert 
   [MyDB].[dbo].[shop_sell]
 (
      [shop_strid], incDays, refreshDT, sell_num ) 
      
SELECT [shop_strid], 7, '2019-06-13', 0
  FROM [MyDB].[dbo].[LbShops] A where A.biz_type = 1 and not exists  (
  
  SELECT shop_strid

  FROM [MyDB].[dbo].[shop_sell] B where B.shop_strid = A.shop_strid
  )
       

 

 posted on 2019-06-13 21:30  宝兰  阅读(282)  评论(0编辑  收藏  举报