要向雇员表中的部门标识列添加FOREIGNKEY约束条件以引用部门表中的标识列,应该使用哪个语句()A、ALTER TABLE雇员MODIFY COLUMN dept_id_fk FOREIGN KEY(部门标识)REFERENCES部门(部门标识)B、ALTER TABLE雇员ADD CONSTRAINT dept_id_fk FOREIGNKEY(部门标识)REFERENCES部门(部门标识)C、ALTER TABLE雇员ADD FOREIGN KEY CONSTRAINT dept_id_fk ON(部门标识)REFERENCES部门(部门标识)D、ALTER TABLE雇员ADD FOREIGN KEY 部门(部门标识)REFERENCES(部门标识)

要向雇员表中的部门标识列添加FOREIGNKEY约束条件以引用部门表中的标识列,应该使用哪个语句()

  • A、ALTER TABLE雇员MODIFY COLUMN dept_id_fk FOREIGN KEY(部门标识)REFERENCES部门(部门标识)
  • B、ALTER TABLE雇员ADD CONSTRAINT dept_id_fk FOREIGNKEY(部门标识)REFERENCES部门(部门标识)
  • C、ALTER TABLE雇员ADD FOREIGN KEY CONSTRAINT dept_id_fk ON(部门标识)REFERENCES部门(部门标识)
  • D、ALTER TABLE雇员ADD FOREIGN KEY 部门(部门标识)REFERENCES(部门标识)

相关考题:

为“部门”表增加一个“人数”字段,类型为整型,正确的语句是( )。A.ALTER TABLE部门ALTER人数IB.ALTER TABLE部门ALTER FIELDS人数IC.ALTER TABLE部门ADD人数ID.ALTER TABLE部门ADD FIELDS人数I

You need to modify the STUDENTS table to add a primary key on the STUDENT_ID column. The table is currently empty. Which statement accomplishes this task?() A. ALTER TABLE students ADD PRIMARY KEY _ id;B. ALTER TABLE students ADD CONSTRAINT PRIMARY KEY (student_id);C. ALTER TABLE students ADD CONSTRAINT stud_id_pk PRIMARY KEY student_id;D. ALTER TABLE students ADD CONSTRAINT stud_id_pk PRIMARY KEY (student_id);E. ALTER TABLE students MODIFY CONSTRAINT stud_id_pk PRIMARY KEY (student_id);

Which statement explicitly names a constraint? () A. ALTER TABLE student_grades ADD FOREIGN KEY (student_id) REFERENCES students (student_id);B. ALTER TABLE student_grades ADD CONSTRAINT NAME = student_id_fk FOREIGN KEY (student_id) REFERENCES students (student_id);C. ALTER TABLE student_grades ADD CONSTRAINT student_id_fk FOREIGN KEY (student_id) REFERENCES students (student_id);D. ALTER TABLE student grades ADD NAMED CONSTRAINT student_id_fk FOREIGN KEY (student_id) REFERENCES students (student_id);E. ALTER TABLE student grades ADD NAME student_id_fk FOREIGN KEY (student_id) REFERENCES students (student_id);

为“部门”表增加一个“人数”字段,类型为整型,正确的命令是( )。A.ALTER TABLE 部门 ALTER 人数 IB.ALTER TABLE 部门 ALTER FIELDS 人数 IC.ALTER TABLE 部门 ADD 人数 ID.ALTER TABLE 部门 ADD FIELDS 人数 I

为“部门”表增加一个“人数”字段,类型为整型,正确的语句是( )。 A.ALTER TABLE部门ALTER人数1SX 为“部门”表增加一个“人数”字段,类型为整型,正确的语句是( )。A.ALTER TABLE部门ALTER人数1B.ALTER TABLE部门ALTER FIELDS人数lC.ALTER TABLE部门ADD人数lD.ALTER TABLE部门ADDFIELDS人数l

为“部门”表增加一个“人数”字段,类型为整型,正确的命令是( )。A.AITER TABLE 部门 ALTER 人数 IB.AITER TABLE 部门 ALTER FIELDS 人数 IC.ALTER TABLE 部门 ADD 人数 ID.ALTER TABLE 部门 ADD FIELDS 人数 I

某数据库系统中,假设有部门关系 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);

您需要从您的方案中的“雇员”表中删除“雇员_FK_部门”约束条件。应使用哪条语句?()A、DROP CONSTRAINT雇员_FK_部门FROM雇员B、DELETE CONSTRAINT雇员_FK_部门FROM雇员C、ALTER TABLE雇员DROP CONSTRAINT雇员_FK_部门D、ALTER TABLE雇员REMOVE CONSTRAINT雇员_FK_部门

为表TEST中ID列添加主键约束的语法是()A、ALTER  TABLE  TEST  CHANGE( ID  INT  PRIMARY  KEY)B、ALTER  TABLE  TEST  ADD( ID  INT  PRIMARY  KEY)C、ALTER  TABLE  TEST  MODIFY( ID  INT  PRIMARY  KEY)D、ALTER  TABLE  TEST  ADD  CONSTRAINT PK  PRIMARY KEY (ID)

下列哪个FOREIGN KEY约束条件关键字用来标识表和父表中的列?()A、RESEMBLESB、ON DELETE CASCADEC、REFERENTIALD、REFERENCES

您在公司的数据库中成功创建了名为SALARY的表。您现在要通过向引用EMPLOYEES表的匹配列的SALARY表添加FOREIGNKEY约束条件来建立EMPLOYEES表与SALARY表之间的父/子关系。尚未向SALARY表添加任何数据。应执行以下哪条语句()A、ALTER TABLE salary ADD CONSTRAINT fk_employee_id_01 FOREIGN KEY(employee_id)REFERENCES employees(employee_id)B、ALTER TABLE salary ADD CONSTRAINT fk_employee_id_ FOREIGN KEY BETWEEN salary(employee_id)AND employees(employee_id)C、ALTER TABLE salary FOREIGN KEY CONSTRAINT fk_employee_id_REFERENCES employees(employee_id)D、ALTER TABLE salary ADD CONSTRAINT fk_employee_id_FOREIGN KEY salary(employee_id)=employees(employee_id)

您想要创建表名为“旅行”的表,作为“雇员”表的子表。应该执行下述哪个语句()A、CREATETABLE旅行(目的地标识主键,出发日期date,返回日期date,雇员标识REFERENCES雇员(雇员标识))B、CREATETABLE旅行(目的地标识number主键,出发日期date,返回日期date,t.雇员标识=e.雇员标识)C、CREATETABLE旅行(目的地标识number主键,出发日期date,返回日期date,JOIN雇员标识number(10)ON雇员(雇员标识))D、CREATETABLE旅行(目的地标识number主键,出发日期date,返回日期date,雇员标识number(10)REFERENCES雇员(雇员标识))

删除PRIMARYKEY约束条件及其所有依赖约束条件的语法是什么()A、ALTER TABLE table_name DROP CONSTRAINT constraint_name CASCADEB、ALTER TABLE table_name DROP CONSTRAINT FOREIGN KEY CASCADEC、DROP CONSTRAINT table_name(constraint_name)D、ALTER TABLE table_name DROP CONSTRAINT constraint_name

要删除“雇员标识序列”序列,应使用以下哪条语句()A、DELETE SEQUENCE雇员标识序列B、DROP SEQUENCE雇员标识序列C、ALTER SEQUENCE雇员标识序列D、REMOV ESEQUENCE雇员标识序列

以下SQL命令执行什么操作() ALTER TABLE employees ADD CONSTRAINT emp_manager_fk FOREIGN KEY(manager_id) REFERENCES employees(employee_id).A、更改employees表并禁用emp_manager_fk约束条件B、向EMPLOYEES表添加FOREIGN KEY约束条件,要求经理必须已是雇员C、向EMPLOYEES表添加FOREIGN KEY约束条件,要求经理标识应匹配每个雇员标识D、更改employees表并添加FOREIGN KEY约束,要求每个雇员标识必须唯一

“雇员”表包含以下列: 雇员标识NUMBER 姓氏VARCHAR2(25) 名字VARCHAR2(25) 部门标识NUMBER 职务标识NUMBER 经理标识NUMBER 薪金NUMBER(9,2) 佣金NUMBER(7,2) 聘用日期DATE 以下哪条SELECT语句可用于显示部门70中薪金最低的10位员工()A、SELECT ROWNUM"排名",姓氏,名字"雇员",薪金"薪金"FROM(SELECT 姓氏,名字,薪金 FROM 雇员ORDER BY 薪金)WHERE ROWNUM=10 AND job_id LIKE’CLERK’AND department_id=70B、SELECT ROWNUM"排名",姓氏,名字"雇员",薪金"薪金"FROM(SELECT 姓氏,名字,薪金,职务标识FROM 雇员 WHERE 职务标识 LIKE’CLERK’AND 部门标识=70ORDER BY 薪金)WHERE ROWNUM=10C、SELECT ROWNUM"排名",姓氏,名字"雇员",薪金"薪金"FROM(SELECT 姓氏,名字,薪金,职务标识,部门标识 FROM 雇员 WHERE ROWNUM=10ORDER BY 薪金)WHERE 职务标识 LIKE’CLERK’AND 部门标识=70D、唯一的方法是使用数据字典

您需要从方案中的雇员表中删除EMP_FK_DEPT约束条件。应使用哪条语句()A、DROP CONSTRAINT EMP_FK_DEPT FROM雇员B、DELETE CONSTRAINT EMP_FK_DEPT FROM雇员C、ALTER TABLE雇员DROP CONSTRAINT EMP_FK_DEPTD、ALTER TABLE雇员REMOVE CONSTRAINT EMP_FK_DEPT

评估以下SELECT语句: SELECT* FROM 雇员 WHERE 部门标识=34 OR 部门标识=45 OR 部门标识=67; 哪个运算符等同于此条SELECT语句中使用的OR条件?()A、INB、ANDC、LIKED、BETWEEN…AND...

You need to modify the STUDENTS table to add a primary key on the STUDENT_ID column. The table is currently empty.Which statement accomplishes this task?()A、ALTER TABLE students ADD PRIMARY KEY student_id;B、ALTER TABLE students ADD CONSTRAINT PRIMARY KEY (student _ id);C、ALTER TABLE students ADD CONSTRAINT stud _ id _pk PRIMARY KEY (student _ id);D、ALTER TABLE students MODIFY CONSTRAINT stud _ id _pk PRIMARY KEY (student _ id);

You need to modify the STUDENTS table to add a primary key on the STUDENT_ID column. The table is currently empty. Which statement accomplishes this task?()A、ALTER TABLE students ADD PRIMARY KEY _ id;B、ALTER TABLE students ADD CONSTRAINT PRIMARY KEY (student_id);C、ALTER TABLE students ADD CONSTRAINT stud_id_pk PRIMARY KEY student_id;D、ALTER TABLE students ADD CONSTRAINT stud_id_pk PRIMARY KEY (student_id);E、ALTER TABLE students MODIFY CONSTRAINT stud_id_pk PRIMARY KEY (student_id);

Which statement explicitly names a constraint?()A、ALTER TABLE student_grades ADD FOREIGN KEY (student_id) REFERENCES students(student_id);B、ALTER TABLE student_grades ADD CONSTRAINT NAME = student_id_fk FOREIGN KEY (student_id) REFERENCES students(student_id);C、ALTER TABLE student_grades ADD CONSTRAINT student_id_fk FOREIGN KEY (student_id) REFERENCES students(student_id);D、ALTER TABLE student grades ADD NAMED CONSTRAINT student_id_fk FOREIGN KEY (student_id) REFERENCES students(student_id);E、ALTER TABLE student grades ADD NAME student_id_fk FOREIGN KEY (student_id) REFERENCES students(student_id);

单选题您在公司的数据库中成功创建了名为SALARY的表。您现在要通过向引用EMPLOYEES表的匹配列的SALARY表添加FOREIGNKEY约束条件来建立EMPLOYEES表与SALARY表之间的父/子关系。尚未向SALARY表添加任何数据。应执行以下哪条语句()AALTER TABLE salary ADD CONSTRAINT fk_employee_id_01 FOREIGN KEY(employee_id)REFERENCES employees(employee_id)BALTER TABLE salary ADD CONSTRAINT fk_employee_id_ FOREIGN KEY BETWEEN salary(employee_id)AND employees(employee_id)CALTER TABLE salary FOREIGN KEY CONSTRAINT fk_employee_id_REFERENCES employees(employee_id)DALTER TABLE salary ADD CONSTRAINT fk_employee_id_FOREIGN KEY salary(employee_id)=employees(employee_id)

单选题“雇员”表包含以下列: 雇员标识NUMBER 姓氏VARCHAR2(25) 名字VARCHAR2(25) 部门标识NUMBER 职务标识NUMBER 经理标识NUMBER 薪金NUMBER(9,2) 佣金NUMBER(7,2) 聘用日期DATE 以下哪条SELECT语句可用于显示部门70中薪金最低的10位员工()ASELECT ROWNUM排名,姓氏,名字雇员,薪金薪金FROM(SELECT 姓氏,名字,薪金 FROM 雇员ORDER BY 薪金)WHERE ROWNUM=10 AND job_id LIKE’CLERK’AND department_id=70BSELECT ROWNUM排名,姓氏,名字雇员,薪金薪金FROM(SELECT 姓氏,名字,薪金,职务标识FROM 雇员 WHERE 职务标识 LIKE’CLERK’AND 部门标识=70ORDER BY 薪金)WHERE ROWNUM=10CSELECT ROWNUM排名,姓氏,名字雇员,薪金薪金FROM(SELECT 姓氏,名字,薪金,职务标识,部门标识 FROM 雇员 WHERE ROWNUM=10ORDER BY 薪金)WHERE 职务标识 LIKE’CLERK’AND 部门标识=70D唯一的方法是使用数据字典

单选题Which statement explicitly names a constraint?()AALTER TABLE student_grades ADD FOREIGN KEY (student_id) REFERENCES students(student_id);BALTER TABLE student_grades ADD CONSTRAINT NAME = student_id_fk FOREIGN KEY (student_id) REFERENCES students(student_id);CALTER TABLE student_grades ADD CONSTRAINT student_id_fk FOREIGN KEY (student_id) REFERENCES students(student_id);DALTER TABLE student grades ADD NAMED CONSTRAINT student_id_fk FOREIGN KEY (student_id) REFERENCES students(student_id);EALTER TABLE student grades ADD NAME student_id_fk FOREIGN KEY (student_id) REFERENCES students(student_id);

单选题您想要创建表名为“旅行”的表,作为“雇员”表的子表。应该执行下述哪个语句()ACREATETABLE旅行(目的地标识主键,出发日期date,返回日期date,雇员标识REFERENCES雇员(雇员标识))BCREATETABLE旅行(目的地标识number主键,出发日期date,返回日期date,t.雇员标识=e.雇员标识)CCREATETABLE旅行(目的地标识number主键,出发日期date,返回日期date,JOIN雇员标识number(10)ON雇员(雇员标识))DCREATETABLE旅行(目的地标识number主键,出发日期date,返回日期date,雇员标识number(10)REFERENCES雇员(雇员标识))

单选题以下SQL命令执行什么操作() ALTER TABLE employees ADD CONSTRAINT emp_manager_fk FOREIGN KEY(manager_id) REFERENCES employees(employee_id).A更改employees表并禁用emp_manager_fk约束条件B向EMPLOYEES表添加FOREIGN KEY约束条件,要求经理必须已是雇员C向EMPLOYEES表添加FOREIGN KEY约束条件,要求经理标识应匹配每个雇员标识D更改employees表并添加FOREIGN KEY约束,要求每个雇员标识必须唯一

单选题要向雇员表中的部门标识列添加FOREIGNKEY约束条件以引用部门表中的标识列,应该使用哪个语句()AALTER TABLE雇员MODIFY COLUMN dept_id_fk FOREIGN KEY(部门标识)REFERENCES部门(部门标识)BALTER TABLE雇员ADD CONSTRAINT dept_id_fk FOREIGNKEY(部门标识)REFERENCES部门(部门标识)CALTER TABLE雇员ADD FOREIGN KEY CONSTRAINT dept_id_fk ON(部门标识)REFERENCES部门(部门标识)DALTER TABLE雇员ADD FOREIGN KEY 部门(部门标识)REFERENCES(部门标识)