解决localdb中文智能的问题

declare @database nvarchar(100)
declare tmpCur cursor for
select DB_NAME()
open tmpCur
fetch next from tmpCur into @database
declare @sql nvarchar(500)
select @sql='alter database ['+@database+'] set single_user with rollback immediate'
exec(@sql)
select @sql= 'alter database ['+@database+'] collate Chinese_PRC_CS_AS'
exec(@sql)
select @sql= 'alter database ['+@database+'] set multi_user'
exec(@sql)
close tmpCur
deallocate tmpCur

posted @ 2018-02-07 18:04  深圳大漠  阅读(172)  评论(0编辑  收藏  举报