Dept_Posi_Psn(部门、职位、人员关系表)DeptID int 部门ID
PosiID int 职位ID
PersonID int 人员ID
PsnStatus tinyint 是否有效()
PosiID int 职位ID
PersonID int 人员ID
PsnStatus tinyint 是否有效()
解决方案 »
- SOS送分了~~~~~~~~~~~~~~~~~~求一个SQL语句
- SQL reporting service等进程占满cpu... 求解决方案
- 一个关于VPF 查找替换的问题 VPF区没有人 不好意思在这发一下。
- 高手们接招吧!
- SQL Server企业版为何导出EXCEL时提示无法初始化链接服务器 "(null)" 的 OLE DB 访问接口 "MICROSOFT.JET.OLEDB.
- 这样一个简单的SQL语句怎么写?
- sql server 菜鸟问题
- 一个查询要查出一个表中字段A='cc'有几个,='bb'的有几个,='cc'有几个最简单的写法是什么
- [SOS] 怎么办==>>>>服务器: 消息 301,级别 16, 查询中包含不允许的外联接请求
- 请问为了今后好找工作,最好猛钻何种工具?(25刺激)
- 请高手帮忙:查错!急
- 请教一个问题!
Departments 部门表
Persons 人员表
Positions 职位表
--建立测试数据
create table 学生
(
学号 nvarchar(4) not null
constraint PK__学生__学号 primary key nonclustered,
姓名 nvarchar(20),
性别 nvarchar(2)
constraint DF__学生_性别 default '男'
)
--------------------------------------------------------------
insert into 学生
select 'S001','CHENG','男'
union all select 'S002','ZHANG','女'
union all select 'S003','WANG','女'
union all select 'S004','FENG','男'create table 课程
(
课程编号 nvarchar(4) not null
constraint PK__课程__课程编号 primary key nonclustered,
课程名称 nvarchar(20),
学分 int
)
insert into 课程
select 'T001','物理',3
union all select 'T002','政治',2
union all select 'T003','数学',5
---------------------------------------------------------------
create table 成绩
(
学号 nvarchar(4) not null,
课程编号 nvarchar(4) not null,
成绩 int
)
insert into 成绩
select 'S001','T001',90
union all select 'S001','T002',50
union all select 'S001','T003',60
union all select 'S002','T001',85
union all select 'S002','T002',60
union all select 'S002','T003',60
union all select 'S003','T001',50
union all select 'S003','T002',59
union all select 'S003','T003',56
union all select 'S004','T001',90
union all select 'S004','T002',98
union all select 'S004','T003',98