大公司SQL语句笔试面试大全

上传人:平*** 文档编号:14098208 上传时间:2017-10-27 格式:DOC 页数:9 大小:96.98KB
返回 下载 相关 举报
大公司SQL语句笔试面试大全_第1页
第1页 / 共9页
大公司SQL语句笔试面试大全_第2页
第2页 / 共9页
大公司SQL语句笔试面试大全_第3页
第3页 / 共9页
大公司SQL语句笔试面试大全_第4页
第4页 / 共9页
大公司SQL语句笔试面试大全_第5页
第5页 / 共9页
点击查看更多>>
资源描述

《大公司SQL语句笔试面试大全》由会员分享,可在线阅读,更多相关《大公司SQL语句笔试面试大全(9页珍藏版)》请在金锄头文库上搜索。

1、1一. 创建一个学生档案表(表名为 xsda),其表结构如下:列名 类型 长度 允许空 备注Xh Char 10 学号Xm Char 8 姓名csny Datetime 出生年月Gz Decimal 6 工资Zy Char 10 专业Create Table xsda(xh Char (10) not null unique,xm Char(8),csny Datetime,gz Decimal(6,1),zy Char (10)1. 在 xsda 表中插入一个学生记录:( 2000jsj008,李平)insert into xsda(xh,xm) values(2000jsj008,李平)2

2、. 把 xsda 表中 80-01-01 前出生的人的工资增加 20%Update xsda set gz=gz*1.2 where csny1970-01-015、 查询工资高于 2000 元的员工的信息。Select * from employee where Salary20006、 查询系统集成部的所有员工的信息。Select employee.* from employee,departments where employee. Depart=departments. Depdid and Depname= 系统集成部7、 统计软件开发部的人均工资select avg(salary)

3、 from employee, departments where employee. Depart=departments. Depdid and Depname= 软件开发部8、 查询所有员工中工资最高和最低的人。Select * from employee where saraly=(select max(saraly) from employee)goSelect * from employee where saraly=(select min(saraly) from employee)9、 统计软件开发部的人数。select count(*) from employee, departments where employee. Depart=departments. Depdid and Depname= 软件开发部10、 将所有员工的工资上调 10%。Update employee set gz=gz*1.211、 将工资收入低于 2500 元的员工每人加薪 200 元。Update employee set gz=gz+200 where saray5014、删除所有 1970 年以前出生的员工的信息。 Delete from employee where birthdate1970-01-01

展开阅读全文
相关资源
相关搜索

当前位置:首页 > 中学教育 > 试题/考题

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号