SQL Server 常用的语句

来源:互联网 发布:卡拉ok软件 编辑:程序博客网 时间:2024/05/16 12:12
1:---数据库修改更新

update 表名 set 列名=Replace(列名,'需要替换的东西','要替换进来的东西') 

2:---创建临时表

 select  a.UId,a.ULoginName,c.* into #UserRole from
(select * from dt_Users) a left join 
(select * from Relation_UserRole) b  on a.UId=b.UId left join
(select * from [Role]) c on b.RoleId=c.RoleId

原创粉丝点击