题目详情
当前位置:首页 > 职业培训考试
题目详情:
发布时间:2024-03-06 04:35:44

[单项选择] 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')) );

更多"Given the following requirements: C"的相关试题:

[单项选择]Given the following requirements:Create a table named TESTTAB, which has an identity column named ACTIVITYNO. Define the identity column to generate the values for the column by default. Start the values at 10 and increment by 10. Make the identity column unique. Which of the following CREATE statements will successfully create this table?()
A. CREATE TABLE TESTTAB (ACTIVITYNO SMALLINT NOT NULL GENERATED ALWAYS AS IDENTITY (START WITH 10 INCREMENT BY 10), ACTKWD CHAR(6) NOT NULL, ACTDESC VARCHAR(20) NOT NULL, UNIQUE(ACTIVITYNO))
B. CREATE TABLE TESTTAB (ACTIVITYNO SMALLINT NOT NULL GENERATED ALWAYS AS IDENTITY (START WITH 1 INCREMENT BY 10), ACTKWD CHAR(6) NOT NULL, ACTDESC VARCHAR(20) NOT NULL, UNIQUE(ACTNO))
C. CREATE TABLE TESTTAB (ACTIVITYNO SMALLINT NOT NULL GENERATED BY DEFAULT AS IDENTITY (START WITH 10 INCREMENT BY 1), ACTKWD CHAR(6) NOT NULL, ACTDESC VARCHAR(20) NOT NULL, UNIQUE(ACTIVITYNO))
D. CREATE TABLE TESTTAB (ACTIVITYNO SMALLINT NOT NULL GENERATED BY DEFAULT AS IDENTITY (START WITH 10 INCREMENT BY 10), ACTKWD CHAR(6) NOT NULL, ACTDESC VARCHAR(20) NOT NULL, UNIQUE(ACTIVITYNO))
[单项选择] Given table T1 has column I1 containing the following data: I1 1 2 3 4 If the following sequence of SQL statements is applied within a single unit of work: UPDATE t1 SET i1 = 3 WHERE i1 = 2; S AVEPOINT s1 ON ROLLBACK RETAIN CURSORS; UPDATE t1 SET i1 = 5 WHERE i1 = 3; SAVEPOINT s2 ON ROLLBACK RETAIN CURSORS;INSERT INTO t1 (i1) VALUES (6); ROLLBACK TO SAVEPOINT s1; UPDATE t1 SET i1 = 2 WHERE i1 = 4; COMMIT; What is the expected sequence of values returned from?() SELECT i1 FROM t1 ORDER BY i1
A. 1, 2, 3, 3
B. 1, 2, 2, 4
C. 1, 2, 3, 3, 6
D. 1, 2, 2, 5, 6
[单项选择] Given the following statements: CREATE TABLE tab1 (col1 INT); CREATE TABLE tab2 (col1 INT); CREATE TRIGGER trig1 AFTER UPDATE ON tab1 REFERENCING NEW AS new1 FOR EACH ROW MODE DB2SQL INSERT INTO tab2 VALUES(new1.col1); INSERT INTO tab1 VALUES(2),(3); What is the result of the following query? SELECT count(*) FROM tab2;()
A. 3
B. 2
C. 1
D. 0
[单项选择] 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. 4
B. 3
C. 1
D. 0
[单项选择]Given the following DDL for the PARTS table:CREATE TABLE parts (part_no INT(9) NOT NULL, part_name VARCHAR(24), part_remain INT(9));All part numbers entered will be different and all rows should be displayed in order of increasing part numbers whenever the table is queried. Which of the following create index statements will meet this criteria and require the least amount of storage for the index object?()
A. CREATE UNIQUE INDEX idx_partno ON parts(part_no)
B. CREATE UNIQUE INDEX idx_partno ON parts(part_name ASC)
C. CREATE UNIQUE INDEX idx_partno ON parts(part_name, part_no ASC)
D. CREATE UNIQUE INDEX idx_partno ON parts(part_no, part_name ASC)
[单项选择] You need to create a table named ORDERS that contains four columns: 1.an ORDER_ID column of number data type 2.a CUSTOMER_ID column of number data type 3.an ORDER_STATUS column that contains a character data type 4.a DATE_ORDERED column to contain the date the order was placed When a row is inserted into the table, if no value is provided for the status of the order, the value PENDING should be used instead. Which statement accomplishes this?()
A. CREATE TABLE orders ( order_id NUMBER(10), customer_id NUMBER(8), order_status NUMBER(10) DEFAULT 'PENDING', date_ordered DATE );
B. CREATE TABLE orders ( order_id NUMBER(10), customer_id NUMBER(8), order_status VARCHAR2(10) = 'PENDING', date_ordered DATE );
C. CREATE OR REPLACE TABLE orders ( order_id NUMBER(10), customer_id NUMBER(8), order_status VARCHAR2(10) DEFAULT 'PENDING', date_ordered DATE );
D. CREATE OR REPLACE TABLE orders ( order_id NUMBER(10), customer_id NUMBER(8), order_status VARCHAR2(10) = 'PENDING', date_ordered DATE );
E. CREATE TABLE orders ( order_id NUMBER(10), customer_id NUMBER(8), order_status VARCHAR2(10) DEFAULT 'PENDING', date_ordered DATE );
F. CREATE TABLE orders ( order_id NUMBER(10), customer_id NUMBER(8), order_status VARCHAR2(10) DEFAULT 'PENDING', date_ordered VARCHAR2 );
[单项选择]A DBA has been asked to create a table which will contain a substantial amount of detailed sales information for each calendar month and maintain it to contain only the last 12 months. Which of the following methods will facilitate the online removal of the oldest month’s data?()
A. Create an MQT that selects the oldest month of data with the REFRESH IMMEDIATE option.
B. Create 12 separate tables, create a view based on all 12, drop the table with the oldest month's data then drop and re- create the view.
C. Create a range partitioned table, partitioned by month, and use the ALTER TABLE statement to detach the oldest month and attach storage for new data.
D. Create a single table, extract the data to be retained using UNLOAD with a SELECT statement, drop and re-create the table then load only the data to be retained.
[多项选择] You create a table with the PERIOD FOR clause to enable the use of the Temporal Validity feature of Oracle Database 12c. Examine the table definition: Which three statements are true concerning the use of the Valid Time Temporal feature for the EMPLOYEES table?()
A. The valid time columns employee_time_start and employee_time_end are automatically created.
B. The same statement may filter on both transaction time and valid temporal time by using the AS OF TIMESTAMP and PERIOD FOR clauses.
C. The valid time columns are not populated by the Oracle Server automatically.
D. The valid time columns are visible by default when the table is described.
E. Setting the session valid time using DBMS_FLASHBACK_ARCHIVE.ENABLE_AT_VALID_TIME sets the visibility for data manipulatio
[单项选择] Scott issues the SQL statements: CREATE TABLE dept (deptno NUMBER(2), dname VARCHAR2(14), loc VARCHAR2(13)}; GRANT SELECT ON DEPT T0 SUE; If Sue needs to select from Scott's DEPT table, which command should she use?()
A. SELECT*FROMDEPT;
B. SELECT*FROMSCOTT.DEPT;
C. SELECT*FROMDBASCOTTDEPT;
D. SELECT*FROMALL_USERSWHEREUSER_NAME=';SCOTT';ANDTABLENAME=';DEPT';;
[单项选择]Which is a valid CREATE TABLE statement?()
A. CREATE TABLE EMP9$# AS (empid number(2));
B. CREATE TABLE EMP*123 AS (empid number(2));
C. CREATE TABLE PACKAGE AS (packid number(2));
D. CREATE TABLE 1EMP_TEST AS (empid number(2));
[多项选择] Examine the following command: CREATE TABLE (prod_id number(4), Prod_name varchar2 (20), Category_id number(30), Quantity_on_hand number (3) INVISIBLE); Which three statements are true about using an invisible column in the PRODUCTS table?()
A. The %ROWTYPE attribute declarations in PL/SQL to access a row will not display the invisible column in the output.
B. The DESCRIBE commands in SQL *Plus will not display the invisible column in the output.
C. Referential integrity constraint cannot be set on the invisible column.
D. The invisible column cannot be made visible and can only be marked as unused.
E. A primary key constraint can be added on the invisible column.
[单项选择] Evaluate the set of SQL statements: CREATE TABLE dept (deptno NUMBER(2), dname VARCHAR2(14), loc VARCHAR2(13)); ROLLBACK; DESCRIBE DEPT What is true about the set?()
A. The DESCRIBE DEPT statement displays the structure of the DEPT table.
B. The ROLLBACK statement frees the storage space occupied by the DEPT table.
C. The DESCRIBE DEPT statement returns an error ORA-04043: object DEPT does not exist.
D. The DESCRIBE DEPT statement displays the structure of the DEPT table only if there is a COMMIT statement introduced before the ROLLBACK statement.

我来回答:

购买搜题卡查看答案
[会员特权] 开通VIP, 查看 全部题目答案
[会员特权] 享免全部广告特权
推荐91天
¥36.8
¥80元
31天
¥20.8
¥40元
365天
¥88.8
¥188元
请选择支付方式
  • 微信支付
  • 支付宝支付
点击支付即表示同意并接受了《购买须知》
立即支付 系统将自动为您注册账号
请使用微信扫码支付

订单号:

请不要关闭本页面,支付完成后请点击【支付完成】按钮
恭喜您,购买搜题卡成功
重要提示:请拍照或截图保存账号密码!
我要搜题网官网:https://www.woyaosouti.com
我已记住账号密码