创建“教师表”,其中Tno是主码 , Dno是外码。 CREATE TABLE 教师表 (Tno char(5) CONSTRAINT PK_Tno PRIMARY KEY, Tname char(20) NULL, Dno FOREIGN KEY char(2) REFERENCES 院系表(Dno) )
创建“教师表”,其中Tno是主码 , Dno是外码。 CREATE TABLE 教师表 (Tno char(5) CONSTRAINT PK_Tno PRIMARY KEY, Tname char(20) NULL, Dno FOREIGN KEY char(2) REFERENCES 院系表(Dno) )
参考答案和解析
A
相关考题:
● 设有职工关系Emp(Eno,Ename,Esex,EDno)和部门关系Dept(Dno,Dname, Daddr),创建这两个关系的SQL语句如下:CREATE TABLE Emp(Eno CHAR(4),Ename CHAR(8),Esex CHAR(1) CHECK(Esex IN ('M', 'F')),EDno CHAR(4) REFERENCES Dept(Dno),PRIMARY KEY (Eno));CREATE TABLE Dept(Dno CHAR(4) NOT NULL UNIQUE,Dname CHAR(20),Daddr CHAR(30));直接运行该语句,DBMS会报错,原因是: (53) 。若经过修改,上述两个表创建完毕之后(尚无数据),则下述语句中能被执行的是 (54) 。(53)A. 创建表Dept时没有指定主码B. 创建表Dept时没有指定外码C. 创建表Emp时,被参照表Dept尚未创建D. 表Emp的外码EDno与被参照表Dept的主码Dno不同名(54)A. INSERT INTO Emp VALUES('e001', '王', 'M ', 'd1');B. INSERT INTO Emp VALUES(NULL, '王', 'M', 'd1');C. INSERT INTO Emp VALUES('e001', '王', 'M', NULL);D. INSERT INTO Emp VALUES('e001', '王', 'X', 'd1');
教学管理数据库创建了如下四张表:CTEATE TABLE student(学号 CHAR(5) not null unique,姓名 CHAR(8),性别 CHAR(2),出生日期 DATETIME,班号 CHAR(5))CTEATE TABLE teacher(教师编号 CHAR(5) not null unique,姓名 CHAR(8),性别 CHAR(2),出生日期 DATETIME,职称 CHAR(6),系别 CHAR(10))CREATE TABLE course(课程号 CHAR(5) not null unique,课程名 CHAR(20),任课教师编号 CHAR(5))CREATE TABLE score(学号 CHAR(5),课程号 CHAR(5),分数 INT)请写出完成以下任务需要的SQL语句: 1) 检索score表中成绩在60-80之间的所有记录。2) 检索student表中所有姓王的学生记录。
用以下SQL语句创建了表名为学生的关系表。create table 学生(学号 char(9) primary key,身份证号 char(18),姓名 varchar(8),性别 char(2),所属学院 varchar(20),专业 varchar (20),届次 char(4),出生日期 date,宿舍 int,简历 image);请写出查询全体学生的姓名及其年龄的SQL语句。
Which SQL statement defines the FOREIGN KEY constraint on the DEPTNO column of the EMP table? () A. CREATE TABLE EMP (empno NUMBER(4), ename VARCNAR2(35), deptno NUMBER(7,2) NOT NULL CONSTRAINT emp_deptno_fk FOREIGN KEY deptno REFERENCES dept deptno);B. CREATE TABLE EMP (empno NUMBER(4), ename VARCNAR2(35), deptno NUMBER(7,2) CONSTRAINT emp_deptno_fk REFERENCES dept (deptno));C. CREATE TABLE EMP (empno NUMBER(4) ename VARCHAR2(35), deptno NUMBER(7,2) NOT NULL, CONSTRAINT emp_deptno_fk REFERENCES dept (deptno) FOREIGN KEY (deptno));D. CREATE TABLE EMP (empno NUMBER(4), ename VARCNAR2(35), deptno NUMBER(7,2) FOREIGN KEY CONSTRAINT emp deptno fk REFERENCES dept (deptno));
“教师表”中有“职工号”、“姓名”和“T龄”字段,其中“职工号”为主关键字,建立“教师表”的SQL命令是A.CREATE TABLE教师表(职工号C(10)PRIMARY,姓名c(20),工龄I)B.CREATE TABLE教师表(职工号C(10)FOREIGN,姓名c(20),工龄I)C.CREATE TABLE教师表(职工号C(10)FOREIGN KEY,姓名c(20),工龄I)D.CREATE TABLE教师表(职工号c(10)PRIMARY KEY,姓名C(20),工龄I)
若某企业的数据库系统中有如下所示的员工关系和仓库关系,每个仓库可有多名员工,但只有一名负责人。员工关系(cmployee):仓库关系(warehouse):则创建仓库表结构的SQL语句为(58)。A.CREATE TABLE(employeeID CHAR(2)NOT NULL UNIQUE, name CHAR(30)NOT NULL, address CHAR(40), pricipallD CHAR(3));B.CREATE warehouse(warehouseD CHAR(2)PRIMARY KEY, name CHAR(30), address CHAR(40), pficipalID CHAR(3));C.CREATE TABLE warehouse(warehouselD CHAR(2)PRIMARY KEY, name CHAR(30)NOT NULL, address CHAR(40), pricipalID CHAR(3), FOREIGN KEY(priciPalID)REFERENCES employee(employeeID));D.CREATE TABLE warehouse(warehouselD CHAR(2), name CHAR(30)NOT NULL, address CHAR(40), pricipalID CHAR(3), PRIMARY KEY(warehouselD), FOREIGN KEY(employeeID)REFERENCES emplo
设有职工关系Emp (Eno,Ename,Esex,EDno)和部门关系Dept (Dno,Dname, Daddr),创建这两个关系的SQL语句如下:CREATE TABLE Emp (Eno CHAR(4),Ename CHAR(8),Esex CHAR(1) CHECK(Esex IN ('M','F')),EDno CHAR(4) REFERENCES Dept (Dno),PRIMARY KEY (Eno));CREATE TABLE Dept (Dno CHAR(4) NOT NULL UNIQUE,Dname CHAR(20),Daddr CHAR(30));直接运行该语句,DBMS会报错,原因是(53)。若经过修改,上述两个表创建完毕之后(尚无数据),则下述语句中能被执行的是(54)。A.创建表Dept时没有指定主码B.创建表Dept时没有指定外码C.创建表Emp时,被参照表Dept尚未创建D.表Emp的外码EDno与被参照表Dept的主码Dno不同名
Given the following requirements:Create a table to contain employee data, with a unique numeric identifier automatically assigned when a row is added, has an EDLEVEL column that permits only the values ‘C‘, ‘H‘ and ‘N‘, and permits inserts only when a corresponding value for the employee‘s department exists in the DEPARTMENT table.Which of the following CREATE statements will successfully create this table?()A.CREATE TABLE emp ( empno SMALLINT NEXTVAL GENERATED ALWAYS AS IDENTITY, firstname VARCHAR(30) NOT NULL, lastname VARCHAR(30) NOT NULL, workdept CHAR(3) NOT NULL, edlevel CHAR(1), PRIMARY KEY emp_pk (empno), FOREIGN KEY emp_workdept_fk ON (workdept) REFERENCES department (deptno), CHECK edlevel_ck VALUES (edlevel IN (‘C‘,‘H‘,‘N‘)), );B.CREATE TABLE emp ( empno SMALLINT NOT NULL GENERATED BY DEFAULT AS IDENTITY, firstname VARCHAR(30) NOT NULL, lastname VARCHAR(30) NOT NULL, workdept CHAR(3), edlevel CHAR(1), CONSTRAINT emp_pk PRIMARY KEY (empno), CONSTRAINT emp_workdept_fk FOREIGN KEY (workdept) REFERENCES department (deptno), CONSTRAINT edlevel_ck CHECK edlevel VALUES (‘C‘,‘H‘,‘N‘) );C.CREATE TABLE emp ( empno SMALLINT NEXTVAL GENERATED BY DEFAULT AS IDENTITY, firstname VARCHAR(30) NOT NULL, lastname VARCHAR(30) NOT NULL, workdept CHAR(3) NOT NULL, edlevel CHAR(1) CHECK IN (‘C‘,‘H‘,‘N‘)), CONSTRAINT emp_pk PRIMARY KEY (empno), CONSTRAINT emp_workdept_fk FOREIGN KEY department (deptno) REFERENCES (workdept) );D.CREATE TABLE emp ( empno SMALLINT NOT NULL GENERATED BY DEFAULT AS IDENTITY, firstname VARCHAR(30) NOT NULL, lastname VARCHAR(30) NOT NULL, workdept CHAR(3), edlevel CHAR(1), CONSTRAINT emp_pk PRIMARY KEY (empno), CONSTRAINT emp_workdept_fk FOREIGN KEY (workdept) REFERENCES department (deptno), CONSTRAINT edlevel_ck CHECK (edlevel IN (‘C‘,‘H‘,‘N‘)) );
The following statements:CREATE TABLE t1 (col1 INT NOT NULL, PRIMARY KEY(col1)); CREATE TABLE t2 (col1 INT NOT NULL, col2 CHAR(1) NOT NULL, PRIMARY KEY (col1, col2), FOREIGN KEY (col1) REFERENCES t1 (col1) ON DELETE CASCADE ON UPDATE RESTRICT); CREATE TABLE t3 (col1 INT NOT NULL, col2 INT NOT NULL, PRIMARY KEY (col1, col2),FOREIGN KEY (col1) REFERENCES t1 (col1) ON DELETE NO ACTION ON UPDATE RESTRICT);INSERT INTO t1 VALUES (1), (2); INSERT INTO t2 VALUES (1, ‘a‘), (1, ‘b‘), (2,‘c‘); INSERT INTO t3 VALUES (1, 100), (2, 200), (2,300);How many rows will be deleted by the following DELETE statement? DELETE FROM t1 WHERE col1= 1;()A.4B.3C.1D.0
某企业的数据库系统中有如下所示的员工关系和仓库关系,每个仓库可有多名员工,但只有一名负责人。员工关系(employee):仓库关系(warehouse):则创建仓库表结构的SQL语句为(58)。A.CREATE TABLE (employee ID CHAR(2)NOTNULL UNIQUE, name CHAR(30)NOT NULL, address CHAR(40), principal ID CHAR(3));B.CREATE warehouse(warehouse ID CHAR(2)PRIMARY KEY, name CHAR(30), address CHAR(40), principal ID CHAR(3));C.CREATE TABLE warehouse(warehouse ID CHAR(2)PRIMARY KEY, name CHAR(30)NOT NULL, address CHAR(40), principal ID CHAR(3), FOREIGN KEY(principal ID)REFERENCES employee(employee ID));D.CREATE TABIE warehouse(warehouse ID CHAR(2), name CHAR(30)NOT NULL, address CHAR(40), principal ID CHAR(3), PRIMARY REY(warehouse ID), FOREIGN KEY(employee ID)REFERENCES employee(employee ID));
某数据库系统中,假设有部门关系 Dept (部门号,部门名,负责人,电话),其中, 部门号是该关系的主键;员工关系 Emp (员工号,姓名,部门,家庭住址),属性家 庭住址包含省、市、街道以及门牌号,该属性是一个( )属性。 创建 Emp 关系的 SQL 语句如下: CREATE TABLE Emp( 员工号 CHAR(4) ( ), 姓名 CHAR(10), 部门 CHAR(4), 家庭住址 CHAR(30), ( ); 为在员工关系 Emp 中增加一个工资字段,其数据类型为数字型并保留2 位小数, 可采用的 SQL 语句为( )。A. 简单 B. 复合 C.多值 D. 派生A. PRIMARY KEY B. NULL C. FOREIGN KEY D. NOT NULLA.PRIMARY KEY NOT NULLB. PRIMARY KEY UNIQUEC. FOREIGN KEY REFERENCES Dept(部门名)D. FOREIGN KEY REFERENCES Dept(部门号)A.ALTER TABLE Emp ADD 工资 CHAR(6,2);B.UPDATA TABLE Emp ADD 工资 NUMERIC(6,2);C.ALTER TABLE Emp ADD 工资 NUMERIC (6,2);D.ALTER TABLE Emp MODIFY 工资 NUMERI C(6,2);
若用如下的SQL语句创建表S, CREATE TABLES (S# CHAR(6)PRIMARY KEY, SNAME CHAR(8)NOT NULL,SEX CHAR(2),AGE INTEGER)下列各元组可插入S表的是______。Ⅰ.('022345','彭鸣明','男','25')Ⅱ.('020746','杨云',NULL,NULL)Ⅲ.('020721','张为','女','21')A.全部B.Ⅰ和ⅡC.Ⅰ和ⅢD.Ⅱ和Ⅲ
某医院有科室关系 D (科室号,科室名,负责人,联系电话),其中: 科室号唯一标识关系 D 中的每一个元组。住院部设有病人关系 R(住院号,姓名,性别 ,科室号,家庭住址),其中,住院号唯一标识关系 R 中的每一个元组,性别的取值只能为M 或 F,要求科室号参照科室关系 D 中的科室号。创建 R 关系的 SQL 语句如下: CREATE TABLE R( 住院号 CHAR(8)( ), 姓名 CHAR (10) , 性别 CHAR(1)( ), 科室号 CHAR(4)( ), 家庭住址 CHAR( 3 0)) ;A. PRIMARY KEY B. REFERENCES D(科室号) C. NOT NULL D. FOREIGN KEY (59) A. IN (M,F) B. CHECK(M,F) C. LIKE(M,F) D.CHECK(性别 IN (M,F)) (60) A. PRIMARY KEY NOT NULL B. PRIMARY KEY UNIQUEC.FOREIGN KEY REFERENCES D(科室号)D.FOREIGN KEY REFERENCES D(科室名)
建立一个学生信息表student,要求它由学号sno,姓名sname,性别sex,年龄age,4个属性组成,其学号属性惟一,学号、姓名字段不能为空。下列语句正确的是A.CREATE TABLE student (sno char(5)NOT NULL sname char(8)NOT NULL sex char age int);B.CREATE TABLE student (sno char(5)NOT NULL UNIQUE sname char(8) sex char age int);C.CREATE TABLE (sno char(5)NOT NULL UNIQUE sname char(8)NOT NULL sex char age int);D.CREATE TABLE student (sno char(5)NOT NULL UNIQUE sname char(8)NOT NULL sex char age int);
( 32 ) “ 教师表 ” 中有 “ 职工号 ” 、 “ 姓名 ” 和 “ 工龄 ” 字段 , 其中 “ 职工号 ”为主关键字 , 建立 “ 教师表 ” 的 SQL 命令是A ) CREATE TABLE 教师表(职工号 C(10) PRIMARY, 姓名 C(20), 工龄 I )B ) CREATE TABLE 教师表(职工号 C(10) FOREIGN, 姓名 C(20), 工龄 I )C ) CREATE TABLE 教师表(职工号 C(10) FOREIGN KEY, 姓名 C(20), 工龄 I )D ) CREATE TABLE 教师表(职工号 C(10) PRIMARY KEY, 姓名 C(20), 工龄 I )
某医院有科室关系D(科室号,科室名,负责人,联系电话),其中:"科室号"唯一标识关系D中的每一个元组。住院部设有病人关系R(住院号,姓名,性别,科室号,家庭住址),其中,"住院号"唯一标识关系R中的每一个元组,"性别"的取值只能为M或F,要求科室号参照科室关系D中的科室号。创建R关系的sQL语句如下:CREATE TABLE R(住院号CHAR58 ( ),姓名CHAR59,性别CHAR60 ( ),科室号cHAR61 (请作答此空),家庭住址CHAR62);A.PRIMARY KEY NOT NULLB.PRIMARY KEY UNIQUEC.FOREIGN KEY REFERENCES D(科室号)D.FOREIGN KEY REFERENCES D(科室名)
某数据库系统中,假设有部门关系:Dept(部门号,部门名,负责人,电话),其中,“部门号”是该关系的主键;员工关系Emp(员工号,姓名,部门,家庭住址),属性“家庭住址”包含省、市、街道以及门牌号,该属性是一个( )属性。创建Emp关系的SQL语句如下:CREATE TABLE Emp(员工号CHAR59 (),姓名CHAR60,部门CHAR59,家庭住址CHAR62,(请作答此空));为在员工关系Emp中增加一个“工资”字段,其数据类型为数字型并保留2位小数,可采用的SQL语句为()。A.PRIMARY KEY NOT NULLB.PRJMARY KEY UNIQUEC.FOREIGN KEY REFERENCES Dept(部门名)D.FOREIGN KEY REFERENCES Dept(部门号)
高校教学管理系统中的院系关系Department和学生关系Students的模式分别为:Department(院系号、院系名、负责人、办公电话),学生关系Students(学号、姓名、身份证号、院系号、联系电话、家庭住址),Department中的“院系号”唯一标识一个院系的学号,Students中的“学号”能唯一标识一名学生,“家庭住址”可进一步分为邮编、省、市、街道。根据以上描述可知,关系Students的候选键为( ),“家庭住址”为( )创建Student的SQL语句如下,请填补其中的空缺CREATE TABLE Students(学号CHAR(8)PRIMARY KEY,姓名CHAR(16),身份证号CHAR(18),院系号CHAR(4)联系电话CHAR(13),家庭住址CHAR(30)FOREIGN KEY(请作答此空);A.(联系电话)REFERENCES Department(办公电话)B.(院系号)REFERENCES Department(院系号)C.(院系号)REFERENCES Students(院系号)D.(负责人号)REFERENCES Students(学号)
某企业信息管理系统的部分关系模式为:部门(部门号,部门名,负责人,电话)、职工(职工号,职工姓名,部门号,职位,住址,联系电话)。部门关系中的部门名为非空值,负责人参照职工关系的职工号,请将下述SQL语句的空缺部分补充完整。CREATE TABLE 部门(部门号 CHAR(4) PRIMARY KEY, 部门名 CHAR(20)( ), 负责人 CHAR(6), 电话 CHAR(15), (请作答此空));A.PRIMARY KEY(部门号)NOT NULL UNIQUEB.PRIMARY KEY(部门名)UNIQUEC.FOREIGN KEY(负责人)REFERENCES 职工(职工号)D.FOREIGN KEY(负责人)REFERENCES 职工(职工姓名)
某医院住院部信息系统中有病人表R(住院号,姓名,性别,科室号,病房,家庭住址),“住院号”唯一标识表R中的每一个元组,“性别”的取值只能为M或F,“家庭住址”包括省、市、街道、邮编,要求科室号参照科室关系D中的科室号;科室关系D(科室号,科室名,负责人,联系电话),“科室号”唯一标识关系D中的每一个元组。a.创建关系R的SQL语句如下:CREATE TABLE R(住院号CHAR(8)( ),姓名CHAR(10),性别CHAR(1)( ),科室号CHAR(4),病房CHAR(4),家庭住址ADDR,//ADDR为用户定义的类(请作答此空));b.表R中复合属性是( )。A.PRIMARY KEY(科室号)NOT NULL UNIQUEB.PRIMARY KEY(科室名)UNIQUEC.FOREIGN KEY(科室号)REFERENCES D(科室号)D.FOREIGN KEY(科室号)REFERENCES D(科室名)
下列SQL语句中,对字段创建唯一的聚集索引的约束是()。A学号 char(8) NOT NULL CONSTRAINT un_no UNIQUEB学号 char(8) NOT NULL CONSTRAINT PK_学生表 PRIMARY KEYC性别 char(2) NOT NULL check (性别=‘男’or 性别=‘女’)D学号 char 8) NOT NULL
You executed the following code: SQL CREATE TABLE COUNTRY (COUNTRY_ID CHAR(2) CONSTRAINT COUNTRY_ID_nn NOT NULL, COUNTRY_NAME VARCHAR2(20), CURRENCY_NAME VARCHAR2(20), CONSTRAINT COUNTRY_ID_PK PRIMARY KEY (COUNTRY_ID)) ORGANIZATION INDEX; In which tablespace will the mapping table be created?()A、 SYSTEM tablespaceB、 SYSAUX tablespaceC、 Undo tablespaceD、 The tablespace of the Index Organized Table (IOT)
Given the following requirements: Create a table to contain employee data, with a unique numeric identifier automatically assigned when a row is added, has an EDLEVEL column that permits only the values 'C', 'H' and 'N', and permits inserts only when a corresponding value for the employee's department exists in the DEPARTMENT table. Which of the following CREATE statements will successfully create this table?()A、CREATE TABLE emp ( empno SMALLINT NEXTVAL GENERATED ALWAYS AS IDENTITY, firstname VARCHAR(30) NOT NULL, lastname VARCHAR(30) NOT NULL, workdept CHAR(3) NOT NULL, edlevel CHAR(1), PRIMARY KEY emp_pk (empno), FOREIGN KEY emp_workdept_fk ON (workdept) REFERENCES department (deptno), CHECK edlevel_ck VALUES (edlevel IN ('C','H','N')), );B、CREATE TABLE emp ( empno SMALLINT NOT NULL GENERATED BY DEFAULT AS IDENTITY, firstname VARCHAR(30) NOT NULL, lastname VARCHAR(30) NOT NULL, workdept CHAR(3), edlevel CHAR(1), CONSTRAINT emp_pk PRIMARY KEY (empno), CONSTRAINT emp_workdept_fk FOREIGN KEY (workdept) REFERENCES department (deptno), CONSTRAINT edlevel_ck CHECK edlevel VALUES ('C','H','N') );C、CREATE TABLE emp ( empno SMALLINT NEXTVAL GENERATED BY DEFAULT AS IDENTITY, firstname VARCHAR(30) NOT NULL, lastname VARCHAR(30) NOT NULL, workdept CHAR(3) NOT NULL, edlevel CHAR(1) CHECK IN ('C','H','N')), CONSTRAINT emp_pk PRIMARY KEY (empno), CONSTRAINT emp_workdept_fk FOREIGN KEY department (deptno) REFERENCES (workdept) );D、CREATE TABLE emp ( empno SMALLINT NOT NULL GENERATED BY DEFAULT AS IDENTITY, firstname VARCHAR(30) NOT NULL, lastname VARCHAR(30) NOT NULL, workdept CHAR(3), edlevel CHAR(1), CONSTRAINT emp_pk PRIMARY KEY (empno), CONSTRAINT emp_workdept_fk FOREIGN KEY (workdept) REFERENCES department (deptno), CONSTRAINT edlevel_ck CHECK (edlevel IN ('C','H','N')) );
Which SQL statement defines the FOREIGN KEY constraint on the DEPTNO column of the EMP table? ()A、CREATE TABLE EMP (empno NUMBER(4), ename VARCNAR2(35), deptno NUMBER(7,2) NOT NULL CONSTRAINT emp_deptno_fk FOREIGN KEY deptno REFERENCES dept deptno);B、CREATE TABLE EMP (empno NUMBER(4), ename VARCNAR2(35), deptno NUMBER(7,2) CONSTRAINT emp_deptno_fk REFERENCES dept (deptno));C、CREATE TABLE EMP (empno NUMBER(4) ename VARCHAR2(35), deptno NUMBER(7,2) NOT NULL, CONSTRAINT emp_deptno_fk REFERENCES dept (deptno) FOREIGN KEY (deptno));D、CREATE TABLE EMP (empno NUMBER(4), ename VARCNAR2(35), deptno NUMBER(7,2) FOREIGN KEY CONSTRAINT emp deptno fk REFERENCES dept (deptno));
单选题设有Teachers表,该表的定义如下: CREATE TABLE Teachers( Tno CHAR(8) PRIMARY KEY, Tname VARCHAR(10) NOT NULL, Age TINYINT CHECK(Age BETWEEN 25 AND 65) ) 下列插入语句中,不能正确执行的是()。AINSERT INTO Teachers VALUES(’T100’,’张宏’,NULL)BINSERT INTO Teachers(Tno,Tname,Age) VALUES(’T100’,’张宏’,30)CINSERT INTO Teachers(Tno,Tname) VALUES(’T100’,’张宏’)DINSERT INTO Teachers VALUES(’T100’,’张宏’)
单选题下列SQL语句中,对字段创建唯一的聚集索引的约束是()。A学号 char(8) NOT NULL CONSTRAINT un_no UNIQUEB学号 char(8) NOT NULL CONSTRAINT PK_学生表 PRIMARY KEYC性别 char(2) NOT NULL check (性别=‘男’or 性别=‘女’)D学号 char 8) NOT NULL
单选题Given the following requirements: Create a table to contain employee data, with a unique numeric identifier automatically assigned when a row is added, has an EDLEVEL column that permits only the values 'C', 'H' and 'N', and permits inserts only when a corresponding value for the employee's department exists in the DEPARTMENT table. Which of the following CREATE statements will successfully create this table?()ACREATE TABLE emp ( empno SMALLINT NEXTVAL GENERATED ALWAYS AS IDENTITY, firstname VARCHAR(30) NOT NULL, lastname VARCHAR(30) NOT NULL, workdept CHAR(3) NOT NULL, edlevel CHAR(1), PRIMARY KEY emp_pk (empno), FOREIGN KEY emp_workdept_fk ON (workdept) REFERENCES department (deptno), CHECK edlevel_ck VALUES (edlevel IN ('C','H','N')), );BCREATE TABLE emp ( empno SMALLINT NOT NULL GENERATED BY DEFAULT AS IDENTITY, firstname VARCHAR(30) NOT NULL, lastname VARCHAR(30) NOT NULL, workdept CHAR(3), edlevel CHAR(1), CONSTRAINT emp_pk PRIMARY KEY (empno), CONSTRAINT emp_workdept_fk FOREIGN KEY (workdept) REFERENCES department (deptno), CONSTRAINT edlevel_ck CHECK edlevel VALUES ('C','H','N') );CCREATE TABLE emp ( empno SMALLINT NEXTVAL GENERATED BY DEFAULT AS IDENTITY, firstname VARCHAR(30) NOT NULL, lastname VARCHAR(30) NOT NULL, workdept CHAR(3) NOT NULL, edlevel CHAR(1) CHECK IN ('C','H','N')), CONSTRAINT emp_pk PRIMARY KEY (empno), CONSTRAINT emp_workdept_fk FOREIGN KEY department (deptno) REFERENCES (workdept) );DCREATE TABLE emp ( empno SMALLINT NOT NULL GENERATED BY DEFAULT AS IDENTITY, firstname VARCHAR(30) NOT NULL, lastname VARCHAR(30) NOT NULL, workdept CHAR(3), edlevel CHAR(1), CONSTRAINT emp_pk PRIMARY KEY (empno), CONSTRAINT emp_workdept_fk FOREIGN KEY (workdept) REFERENCES department (deptno), CONSTRAINT edlevel_ck CHECK (edlevel IN ('C','H','N')) );
单选题The following statements: CREATE TABLE t1 (col1 INT NOT NULL, PRIMARY KEY(col1)); CREATE TABLE t2 (col1 INT NOT NULL, col2 CHAR(1) NOT NULL, PRIMARY KEY (col1, col2), FOREIGN KEY (col1) REFERENCES t1 (col1) ON DELETE CASCADE ON UPDATE RESTRICT); CREATE TABLE t3 (col1 INT NOT NULL, col2 INT NOT NULL, PRIMARY KEY (col1, col2),FOREIGN KEY (col1) REFERENCES t1 (col1) ON DELETE NO ACTION ON UPDATE RESTRICT);INSERT INTO t1 VALUES (1), (2); INSERT INTO t2 VALUES (1, 'a'), (1, 'b'), (2,'c'); INSERT INTO t3 VALUES (1, 100), (2, 200), (2,300); How many rows will be deleted by the following DELETE statement? DELETE FROM t1 WHERE col1= 1;()A4B3C1D0