SQL上机实验步骤及举例

<< MIS实验上机安排到本周六下午 | 首 页 | SQL练习与Learning 数据库脚本 >> 2007-11-09 SQL上机实验步骤及举例 - [ 数据库 ] 1. 建立数据库 CREATE DATABASE Sales 2. 创建表 CREATE TABLE student ( xh char (3) primary key, xm char (8) NOT NULL ) 3. 删除表 DROP TABLE student 4. 修改表结构 alter table student add age smallint 5. SQL 简单查询 (1) 带星号查询 select * from student insert into student VALUES ('003','Tom',18) insert into student VALUES ('002','Tomy',18) insert into student VALUES ('001','Sam',19) (2) 投影 select xh,xm from student (3) 带字符匹配运算符查询 select xh,xm from student where xm like 'T%' select xh,xm from student where xm like 'T___' (4) 投影和选择所构成的联合查询 (5) 关于空值的查询 (6) 关于日期的查询 6. 连接查询 Tag: SQLServer 实验 tsingsam @ 20:10:54 | 引用 0 | 编辑 评论 李老师:您好!SQL Server能下载吗? 06工管 ( http:// 发表评论 姓名: E-mail: 地址:

原始快照:web.archive.org