ts , salary where employees . departmentid = departments . departmentid and employees . employeeid = salary . employeeid 2 、查询视图 employeeid : 3 、向视图 view1 中插入一行数据: insert into view1 values ( '111111' ,' 谎言', '1' , '30000' ) 4、查看视图(没有影响)基本表: 实验 5 1、定义一个变量,用于描述 YGGL 数据库的 salary 表中 000001 号员工的实际收入,然后查询该变量: declare @hy int set @hy =( select e - e from salary where employeeid = '000001' ) select @hy 2、使用运算符“>”: select name from employees where birthday > '1974-10-10' 3、判断姓名为“王林”的员工实际收入是否高于 3000 元, 如果是则显示“高收入”, 否则显示“收入不高于 3000 ”: if (( select e from salary , employees where salary . employeeid = employees . employeeid and employees . name =' 刘明' )> 3000 ) select e as ' 高收入' from salary , employees where salary . employeeid = employees . employeeid and employees . name =' 刘明' else select ' 收入不高于'