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. CR

题目
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));


相似考题
更多“Which SQL statement defines the FOREIGN KEY constraint on the DEPTNO column of the EMP table? () ”相关问题
  • 第1题:

    部门DEPT(Deptno,Name,Tel,Leader)和职工EMP(Empno,Name,Sex,Address, Deptno)实体集,若一个职工只能属于一个部门,部门负责人Leader是一个职工。关系 DEPT和EMP的外码分别为(30);下图中a、b处的实体名分别为(31)。

    A.Deptno、Empno

    B.Name、Deptno

    C.Leader、Deptno

    D.Name、Address


    正确答案:C

  • 第2题:

    列出所有部门的职工人数(包括没有职工的部门) ()。

    A.select dept.deptno,dname,count(emp.empno) from emp,dept where emp.deptno=dept.deptno group by dept.deptno,dname;

    B.select dept.deptno,dname,count(emp.empno) from emp,dept where emp.deptno()=dept.deptno group by dept.deptno,dname;

    C.select dept.deptno,dname,count(emp.empno) from emp,dept where emp.deptno=dept.deptno() group by dept.deptno,dname;

    D.select dept.deptno,dname,count(emp.empno) from emp,dept where emp.deptno(


    B

  • 第3题:

    下列选项中,关于Statement描述错误的是()

    A.Statement是用来执行SQL语句的

    B.Statement是PreparedStatement的子接口

    C.获取Statement实现需要使用Connection的createStatement()方法

    D.PreparedStatement能使用参数占位符,而Statement不行


    Statement是PreparedStatement的子接口

  • 第4题:

    下列选项中,关于Statement描述错误的是()

    A.Statement是用来执行SQL语句的

    B.Statement是PreparedStatement的子接口

    C.获取Statement实现需要使用Connection的createStatement()方法

    D.PreparedStatement能使用参数占位符,而Statement不行


    Statement是PreparedStatement的子接口

  • 第5题:

    7、Statement对象提供了执行基本SQL语句的功能。


    正确

  • 第6题:

    Statement对象本身包含SQL语句。


    错误