例3.1 删除数据库School。
DROP DATABASE School;
例3.2 建立一个雇员表Employee,它由员工编号(Eno)、
员工姓名(EName)、性别(ESex)、年龄(EAge)、
职称(ETitle)五个属性组成。其中员工编号为主码,
员工姓名不能为空且取值唯一。
CREATE TABLE Employee
(ENo CHAR(5) PRIMARY KEY,
EName CHAR(8) NOT NULL UNIQUE,
ESex CHAR(1),
EAge Integer,
ETitle CHAR(15));
例3.3 向Employee表中增加一列“电话号码”,
其数据类型为字符型。
ALTER TABLE Employee
ADD ETel
EMPLOYEE表的创建与查询
最新推荐文章于 2024-04-15 08:18:22 发布
本文详细介绍了如何在数据库中创建EMPLOYEE表,包括字段定义、约束条件以及示例数据的插入。同时,我们还提供了一系列查询EMPLOYEE表的SQL语句示例,涵盖了基础查询、条件过滤及复杂联接操作,帮助读者全面理解并掌握对员工数据的管理。
摘要由CSDN通过智能技术生成