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‘)) );
第1题:
包容类Contain和内嵌类Embed定义如下: #include<iostream.h> class Contain { private: int X; protected: int z; public: class Embed { private: int y; public: Embed(){y=100;} int Embed_Fun(); }MyEmbed; int Contain_Fun(
A.定义类Embed对象的语句是:Contain? Embed embed;
B.类Contain的成员函数Contain_Fun()中可以用MyEmbe D.y的方式访问类Embed的私有成员y
C.类Embed的成员函数Embed_Fun()中可以直接访问Contain的私有成员x
D.类Embed的成员函数Embed_Fun()中可以直接访问Contain的保护成员Z
第2题:
A.contain,inoculate,quarantine,andtreat
B.inoculate,contain,quarantine,andtreat
C.quarantine,contain,inoculate,andtreat
D.preparation,identification,traceback,andpostmortem
E.preparation,classification,reaction,andtreat
F.identification,inoculation,postmortem,andreaction
第3题:
【单选题】对于建立在数据库上的DDL触发器,常用的激活DDL触发器的事件不包括()
A.Create_Table,Alter_Table,Drop_Table
B.Create_View,Alter_View,Drop_View
C.Create_Procedure,Alter_Procedure,Drop_Procedure
D.Rollback
第4题:
类 Contain 的定义如下: class Contain { private: int x; protected: int z; public: class Embed { private: int y; public: Embed ( ) { y=100; } int Embed_Fun(); }MyEmbed; int Contain_Fun(); }; 下列对上面定义的描述中,正确的是( )。
A.定义类Embed对象的语句是:Contain::Embed Myobject;
B.类Contain的成员函数Contain_Fun()中可以访问对象MyEmbed的私有成员y
C.类Embed的成员函数Embed_Fun()中可以直接访问类Contain的所有成员
D.类Embed的成员函数Embed_Fun()中只能直接访问类Contain的公有成员
第5题:
第6题:
如果要让某个用户能够在所有模式下建表应该授予此用户哪个权限?
A.create table
B.create any table
C.create all table
D.create * table