⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 sqlquery1.sql

📁 办公系统办公系统办公系统办公系统办公系统办公系统办公系统办公系统办公系统办公系统办公系统办公系统办公系统办公系统办公系统
💻 SQL
字号:

if exists(Select * from sysobjects where name='View_Role')
	drop view View_Role
go
create view View_Role
as
select R.RoleId,S.NodeId,S.ParentNodeId from RoleRight as R,SysFun as S where R.NodeId=S.NodeId
go

select * from View_Role
go


if exists(Select * from sysobjects where name='View_Branch')
	drop view View_Branch
go
create view View_Branch
as
select B.BranchId,B.BranchName,B.BranchShortName,D.DepartId,D.DepartName,D.PrincipalUser from BranchInfo as B,DepartInfo as D where B.BranchId=D.BranchId
go
select * from View_Branch
go


if exists(Select * from sysobjects where name='View_Sign')
	drop view View_Sign
go
create view View_Sign
as
select S.SignId,S.UserId,S.SignTime,S.SignDesc,S.SignTag,U.UserName,U.DepartId from ManualSign as S,UserInfo as U where S.UserId=U.UserId
go
select * from View_Sign
go


if exists(Select * from sysobjects where name='View_Sign_Search')
	drop view View_Sign_Search
go
create view View_Sign_Search
as
select S.UserId,S.SignTime,S.SignDesc,S.SignTag,S.UserName,D.BranchName,D.DepartName from View_Sign as S,View_Branch as D where S.DepartId=D.DepartId
go
select * from View_Sign_Search
-------------------------------------------------------------------------------------------

select * from View_Sign
select * from View_Branch
select * from View_Sign_Search


⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -