1234567891011121314151617181920212223242526272829303132333435363738394041424344 |
- --将db和备份数据存储在dindanjd_back中
- select [id]
- ,[name]
- ,[date]
- ,[time]
- ,[waiter1]
- ,[waiter2]
- ,[status]
- ,[waiter12]
- ,[waiter22]
- ,[bookingdate]
- ,[dress]
- ,[bz]
- ,[clerk]
- ,[inputtime]
- ,[branch] into [befupgrade].[dbo].[dindanjd_back]
- from [befupgrade].[dbo].[dindanjd]
- insert into [befupgrade].[dbo].[dindanjd_back]
- select [id]
- ,[name]
- ,[date]
- ,[time]
- ,[waiter1]
- ,[waiter2]
- ,[status]
- ,[waiter12]
- ,[waiter22]
- ,[bookingdate]
- ,[dress]
- ,[bz]
- ,[clerk]
- ,[inputtime]
- ,[branch] from [db].[dbo].[dindanjd_back2]
- --去除完全重复的记录;1163
- select distinct * into [befupgrade].[dbo].[dindanjd_back#]
- from [befupgrade].[dbo].[dindanjd_back]
- delete from [befupgrade].[dbo].[dindanjd_back#] where name='系统默认景点'
- drop table [db].[dbo].[dindanjd_back2]
- select * into [db].[dbo].[dindanjd_back2] from [befupgrade].[dbo].[dindanjd_back#]
|