itgle.com

评估以下CREATETABLE语句的执行结果: CREATET ABLE customers (customer_id NUMBER,customer_name VARCHAR2(25), address VARCHAR 2(25), city VARCHAR 2(25), region VARCHAR 2(25), postal_code VARCHAR 2(11), CONSTRAINT customer_id_un UNIQUE(customer_id), CONSTRAINTcustomer_na

题目

评估以下CREATETABLE语句的执行结果: CREATET ABLE customers (customer_id NUMBER,customer_name VARCHAR2(25), address VARCHAR 2(25), city VARCHAR 2(25), region VARCHAR 2(25), postal_code VARCHAR 2(11), CONSTRAINT customer_id_un UNIQUE(customer_id), CONSTRAINTcustomer_name_nnNOTNULL(customer_name)); 为什么执行时此语句会失败()

  • A、NUMBER数据类型要求精度值
  • B、UNIQUE约束条件必须在列级定义
  • C、CREATETABLE语句不定义PRIMARYKEY
  • D、不能在表级定义NOTNULL约束条件

相似考题
更多“评估以下CREATETABLE语句的执行结果: CREATET ABLE customers (customer_id NUMBER,customer_name VARCHAR2(25), address VARCHAR 2(25), city VARCHAR 2(25), region VARCHAR 2(25), postal_code VARCHAR 2(11), CONSTRAINT customer_id_un UNIQUE(customer_id), CONSTRAINTcustomer_na”相关问题
  • 第1题:

    您的主管让您修改ORDERS表中的AMOUNT列。他要求将该列配置为接受默认值250。该表包含您需要保留的数据。应执行以下哪条语句来完成此任务()

    • A、ALTER TABLE orders CHANGE DATATYPE amount TO DEFAULT 250
    • B、ALTER TABLE orders MODIFY(amount DEFAULT 250)
    • C、DROP TABLE orders CREATE TABLE orders(orderno varchar2(5)CONSTRAINT pk_orders_01 PRIMARY KEY,customerid varchar2(5)REFERENCES customers(customerid),orderdate date,amount DEFAULT 250)
    • D、DELETE TABLE orders CREATE TABLE orders(orderno varchar2(5)CONSTRAINT pk_orders_01 PRIMARY KEY,customerid varchar2(5)REFERENCES customers(customerid),orderdate date,amount DEFAULT 250)

    正确答案:B

  • 第2题:

    请观察PRODUCT表和SUPPLIER表的结构: PRODUCT PRODUCT_ID NUMBER NOT NULL, Primary Key PRODUCT_NAME VARCHAR2 (25) SUPPLIER_ID NUMBER ( SUPPLIER表的SUPPLIER_ID的外键) LIST_PRICE NUMBER (7,2) COST NUMBER (7,2) QTY_IN_STOCK NUMBER QTY_ON_ORDER NUMBER REORDER_LEVEL NUMBER REORDER_QTY NUMBER SUPPLIER SUPPLIER_ID NUMBER NOT NULL, Primary Key SUPPLIER_NAME VARCHAR2 (25) ADDRESS VARCHAR2 (30) CITY VARCHAR2 (25) REGION VARCHAR2 (10) POSTAL_CODE VARCHAR2 (11) 请评估以下语句: ALTER TABLE suppliers DISABLE CONSTRAINT supplier_id_pk CASCADE; 该语句用于执行什么任务()

    • A、删除引用SUPPLIERS表的所有约束条件
    • B、删除对FOREIGNKEY表的FOREIGNKEY约束条件
    • C、删除引用PRODUCTS表的所有约束条件
    • D、禁用所有依赖于PRODUCTS表的SUPPLIER_ID列的完整性约束条件
    • E、禁用所有依赖于SUPPLIERS表的SUPPLIER_ID列的完整性约束条件

    正确答案:E

  • 第3题:

    Which statement accomplish this? ()

    • A、CREATE TABLE orders ( order_id NUMBER (10), customer_id NUMBER (8), order_status VARCHAR2 (10), date_ordered DATE = SYSDATE);
    • B、CREATE TABLE orders ( order_id NUMBER (10), customer_id NUMBER (8), order_status VARCHAR2 (10), date_ordered DATE DEFAULT SYSDATE);
    • C、CREATE OR REPLACE TABLE orders ( order_id NUMBER (10), customer_id NUMBER (8), order_status VARCHAR2 (10), date_ordered DATE DEFAULT SYSDATE);
    • D、CREATE OR REPLACE TABLE orders ( order_id NUMBER (10), customer_id NUMBER (8), order_status NUMBER (10), date_ordered DATE = SYSDATE);
    • E、CREATE TABLE orders ( order_id NUMBER (10), customer_id NUMBER (8), order_status NUMBER (10), date_ordered DATE = SYSDATE);
    • F、CREATE TABLE orders ( order_id NUMBER (10), customer_id NUMBER (8), order_status NUMBER (10), date_ordered DATE DEFAULT SYSDATE);

    正确答案:B

  • 第4题:

    The CUSTOMERS table has these columns: CUSTOMER_ID NUMBER(4) NOT NULL CUSTOMER_NAME VARCHAR2(100) NOT NULL STREET_ADDRESS VARCHAR2(150) CITY_ADDRESS VARCHAR2(50) STATE_ADDRESS VARCHAR2(50) PROVINCE_ADDRESS VARCHAR2(50) COUNTRY_ADDRESS VARCHAR2(50) POSTAL_CODE VARCHAR2(12) CUSTOMER_PHONE VARCHAR2(20) Which statement finds the rows in the CUSTOMERS table that do not have a postal code? ()

    • A、SELECT customer_id, customer_name FROM customers WHERE postal_code CONTAINS NULL;
    • B、SELECT customer_id, customer_name FROM customers WHER postal_code = ' ___________';
    • C、SELECT customer_id, customer_name FROM customers WHERE postal _ code IS NULL;
    • D、SELECT customer_id, customer_name FROM customers WHERE postal code IS NVL;
    • E、SELECT customer_id, customer_name FROM customers WHERE postal_code = NULL;

    正确答案:C

  • 第5题:

    The CUSTOMERS table has these columns: CUSTOMER_ID NUMBER (4) NOT NULL CUSTOMER_NAME VARCHAR2 (100) NOT NULL STREET_ADDRESS VARCHAR2 (150) CITY_ADDRESS VARHCAR2 (50) STATE_ADDRESS VARCHAR2 (50) PROVINCE_ADDRESS VARCHAR2 (50) COUNTRY_ADDRESS VARCHAR2 (50) POSTAL_CODE VARCHAR2 (12) CUSTOMER_PHONE VARCHAR2 (20) The CUSTOMER_ID column is the primary key for the table. You need to determine how dispersed your customer base is. Which expression finds the number of different countries represented in the CUSTOMERS table?()

    • A、COUNT(UPPER(country_address))
    • B、COUNT(DIFF(UPPER(country_address)))
    • C、COUNT(UNIQUE(UPPER(country_address)))
    • D、COUNT DISTINTC UPPER(country_address)
    • E、COUNT(DISTINTC (UPPER(country_address)))

    正确答案:E

  • 第6题:

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

    正确答案:E

  • 第7题:

    Examine the description of the CUSTOMERS table: CUSTOMER_ID NUMBER(4) NOT NULL CUSTOMER_NAME VARCHAR2(100) NOT NULL STREET_ADDRESS VARCHAR2(150) CITY_ADDRESS VARCHAR2(50) STATE_ADDRESS VARCHAR2(50) PROVINCE_ADDRESS VARCHAR2(50) COUNTRY_ADDRESS VARCHAR2(50) POSTAL_CODE VARCHAR2(12) CUSTOMER_PHONE VARCHAR2(20) The CUSTOMER_ID column is the primary key for the table. Which statement returns the city address and the number of customers in the cities Los Angeles or San Francisco?()

    • A、SELECT city_address, COUNT(*) FROM customers WHERE city _ address IN ('Los Angeles','San Fransisco');
    • B、SELECT city_address, COUNT (*) FROM customers WHERE city address IN ( 'Los Angeles', 'San Fransisco') GROUP BY city_address;
    • C、SELECT city_address, COUNT(customer_id) FROM customers WHERE city_address IN ( 'Los Angeles', 'San Fransisco') GROUP BY city_address, customer_ id;
    • D、SELECT city_address, COUNT (customer_id) FROM customers GROUP BY city_ address IN ('Los Angeles','San Fransisco');

    正确答案:B

  • 第8题:

    单选题
    You need to produce a report for mailing labels for all customers. The mailing label must have only the customer name and address. The CUSTOMERS table has these columns: CUST_ID NUMBER(4) NOT NULL CUST_NAME VARCHAR2(100) NOT NULL CUST_ADDRESS VARCHAR2(150) CUST_PHONE VARCHAR2(20) Which SELECT statement accomplishes this task?()
    A

    SELECT* FROM customers;

    B

    SELECT name, address FROM customers;

    C

    SELECT id, name, address, phone FROM customers;

    D

    SELECT cust_name, cust_address FROM customers;

    E

    SELECT cust_id, cust_name, cust_address, cust_phone FROM customers;


    正确答案: C
    解析: 暂无解析

  • 第9题:

    单选题
    评估EMPLOYEE表的结构: EMPLOYEE_IDNUMBER(9) LAST_NAMEVARCHAR2(25) FIRST_NAMEVARCHAR2(25) DEPARTMENT_IDNUMBER(9) MANAGER_IDNUMBER(9) SALARYNUMBER(7,2) 您使用以下哪条语句可将LAST_NAME列(当前包含200条记录)的长度增加到35个字节()
    A

    ALTER employee TABLEAL TERCOLUMN(last_name VARCHAR2(35))

    B

    ALTER TABLE employee RENAME last_name VARCHAR2(35)

    C

    ALTER TABLE employee MODIFY(last_name VARCHAR2(35))

    D

    不能增大LAST_NAME列的宽度


    正确答案: B
    解析: 暂无解析

  • 第10题:

    单选题
    评估以下CREATETABLE语句的执行结果: CREATET ABLE customers (customer_id NUMBER,customer_name VARCHAR2(25), address VARCHAR 2(25), city VARCHAR 2(25), region VARCHAR 2(25), postal_code VARCHAR 2(11), CONSTRAINT customer_id_un UNIQUE(customer_id), CONSTRAINTcustomer_name_nnNOTNULL(customer_name)); 为什么执行时此语句会失败()
    A

    NUMBER数据类型要求精度值

    B

    UNIQUE约束条件必须在列级定义

    C

    CREATETABLE语句不定义PRIMARYKEY

    D

    不能在表级定义NOTNULL约束条件


    正确答案: D
    解析: 暂无解析

  • 第11题:

    DEPARTMENT 表包含以下列: DEPT_ID NUMBER, Primary Key DEPT_ABBR VARCHAR2(4) DEPT_NAME VARCHAR2(30) MGR_ID NUMBER EMPLOYEE 表包含以下列: EMPLOYEE_ID NUMBER EMP_LNAME VARCHAR2(25) EMP_FNAME VARCHAR2(25) DEPT_ID NUMBER JOB_ID NUMBER MGR_ID NUMBER SALARY NUMBER(9,2) HIRE_DATE DATE 请评估以下语句: ALTER TABLE employee ADD CONSTRAINT REFERENTIAL (mgr_id) TO department(mgr_id); 是以下哪个说法()

    • A、ALTER TABLE语句创建从EMPLOYEE表到DEPARTMENT表的引用约束条件
    • B、ALTER TABLE语句创建从DEPARTMENT表到EMPLOYEE表的引用约束条件
    • C、ADD CONSTRAINT子句存在语法错误,因此ALTER TABLE语句将会失败
    • D、ALTER TABLE语句执行成功,但不重新创建引用约束条件

    正确答案:A

  • 第12题:

    The CUSTOMERS table has these columns: CUSTOMER_ID NUMBER(4) NOT NULL CUSTOMER_NAME VARCHAR2(100) NOT NULL STREET_ADDRESS VARCHAR2(150) CITY_ADDRESS VARCHAR2(50) STATE_ADDRESS VARCHAR2(50) PROVINCE_ADDRESS VARCHAR2(50) COUNTRY_ADDRESS VARCHAR2(50) POSTAL_CODE VARCHAR2(12) CUSTOMER_PHONE VARCHAR2(20) The CUSTOMER_ID column is the primary key for the table. Which two statements find the number of customers? ()

    • A、SELECT TOTAL(*) FROM customer;
    • B、SELECT COUNT(*) FROM customer;
    • C、SELECT TOTAL(customer_id) FROM customer;
    • D、SELECT COUNT(customer_id) FROM customer;
    • E、SELECT COUNT(customers) FROM customer;
    • F、SELECT TOTAL(customer_name) FROM customer;

    正确答案:B,D

  • 第13题:

    The CUSTOMERS table has these columns: CUSTOMER_ID NUMBER(4) NOT NULL CUSTOMER_NAME VARCHAR2(100) NOT NULL STREET_ADDRESS VARCHAR2(150) CITY_ADDRESS VARCHAR2(50) STATE_ADDRESS VARCHAR2(50) PROVINCE_ADDRESS VARCHAR2(50) COUNTRY_ADDRESS VARCHAR2(50) POSTAL_CODE VARCHAR2(12) CUSTOMER_PHONE VARCHAR2(20) A promotional sale is being advertised to the customers in France. Which WHERE clause identifies customers that are located in France?()

    • A、WHERE lower(country_address) = "france"
    • B、WHERE lower(country_address) = 'france'
    • C、WHERE lower(country_address) IS 'france'
    • D、WHERE lower(country_address) = '%france%'
    • E、WHERE lower(country_address) LIKE %france%

    正确答案:B

  • 第14题:

    Examine the description of the CUSTOMERS table: CUSTOMER_ID NUMBER(4) NOT NULL CUSTOMER_NAME VARCHAR2(100) NOT NULL STREET_ADDRESS VARCHAR2(150) CITY_ADDRESS VARCHAR2(50) STATE_ADDRESS VARCHAR2(50) PROVINCE_ADDRESS VARCHAR2(50) COUNTRY_ADDRESS VARCHAR2(50) POSTAL_CODE VARCHAR2(12) CUSTOMER_PHONE VARCHAR2(20) The CUSTOMER_ID column is the primary key for the table. Which statement returns the city address and the number of customers in the cities Los Angeles or San Francisco?()

    • A、SELECT city_address, COUNT(*) FROM customers WHERE city_address IN ('Los Angeles', 'San Francisco');
    • B、SELECT city_address, COUNT(*) FROM customers WHERE city_address IN ('Los Angeles', 'San Francisco') GROUP BY city_address;
    • C、SELECT city_address, COUNT(customer_id) FROM customers WHERE city_address IN ('Los Angeles', 'San Francisco') GROUP BY city_address, customer_id;
    • D、SELECT city_address, COUNT(customer_id) FROM customers GROUP BY city_address IN ('Los Angeles', 'San Francisco');

    正确答案:B

  • 第15题:

    Which SQL statement defines a FOREIGN KEY constraint on the DEPTNO column of the EMP table?()

    • A、CREATE TABLE EMP (empno NUMBER(4), ename VARCHAR2(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 VARCHAR2(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 VARCHAR2(35), deptno NUMBER(7,2) FOREIGN KEY CONSTRAINT emp_deptno_fk REFERENCES dept (deptno));

    正确答案:B

  • 第16题:

    You need to create a table named ORDERS that contain four columns: 1. an ORDER_ID column of number data type 2. aCUSTOMER_ID column of number data type 3. an ORDER_STATUS column that contains a character data type 4. aDATE_ORDERED column to contain the date the order was placed. When a row is inserted into the table, if no value is provided when the order was placed, today's date should be used instead. Which statement accomplishes this?()

    • A、CREATE TABLE orders ( order_id NUMBER (10), customer_id NUMBER (8), order_status VARCHAR2 (10), date_ordered DATE = SYSDATE);
    • B、CREATE TABLE orders ( order_id NUMBER (10), customer_id NUMBER (8), order_status VARCHAR2 (10), date_ordered DATE DEFAULT SYSDATE);
    • C、CREATE OR REPLACE TABLE orders ( order_id NUMBER (10), customer_id NUMBER (8), order_status VARCHAR2 (10), date_ordered DATE DEFAULT SYSDATE);
    • D、CREATE OR REPLACE TABLE orders ( order_id NUMBER (10), customer_id NUMBER (8), order_status VARCHAR2 (10), date_ordered DATE = SYSDATE);
    • E、CREATE TABLE orders ( order_id NUMBER (10), customer_id NUMBER (8), order_status NUMBER (10), date_ordered DATE = SYSDATE);
    • F、CREATE TABLE orders ( order_id NUMBER (10), customer_id NUMBER (8), order_status NUMBER (10), date_ordered DATE DEFAULT SYSDATE);

    正确答案:B

  • 第17题:

    单选题
    FACULTY表包含以下各列: FACULTYID VARCHAR2(5) NOT NULL PRIMARY KEY FIRST_NAME VARCHAR2(20) LAST_NAME VARCHAR2(20) ADDRESS VARCHAR2(35) CITY VARCHAR2(15) STATE VARCHAR2(2) ZIP NUMBER(9) TELEPHONE NUMBER(10) STATUS VARCHAR2(2) NOT NULL COURSE 表包含以下各列: COURSEID VARCHAR2(5) NOT NULL PRIMARY KEY SUBJECT VARCHAR2(5) TERM VARCHAR2(6 FACULTYID VARCHAR2(5) NOT NULL FOREIGN KEY 您需要制定一个报表,用于确定在下学期任教的所有副教授。您要创建一个视图来简化报表的创建过程。以下哪条CREATE VIEW语句将完成此任务()
    A

    CREATE VIEW(SELECT first_name,last_name,status,courseid,subject,term FROM faculty,course WHERE facultyid=facultyid)

    B

    CREATE VIEW pt_view ON(SELEC Tfirst_name,last_name,status,courseid,subject,term FROM faculty f and coursec WHERE f.facultyid=c.facultyid)

    C

    CREATE VIEW pt_view IN(SELECT first_name,last_name,status,courseid,subject,term FROM faculty course)

    D

    CREATE VIEW pt_view AS(SELECT first_name,last_name,status,courseid,subject,term FROM facultyf,coursec WHERE f.facultyid=c.facultyid)


    正确答案: D
    解析: 暂无解析

  • 第18题:

    单选题
    The CUSTOMERS table has these columns: CUSTOMER_ID NUMBER(4) NOT NULL CUSTOMER_NAME VARCHAR2(100) NOT NULL STREET_ADDRESS VARCHAR2(150) CITY_ADDRESS VARCHAR2(50) STATE_ADDRESS VARCHAR2(50) PROVINCE_ADDRESS VARCHAR2(50) COUNTRY_ADDRESS VARCHAR2(50) POSTAL_CODE VARCHAR2(12) CUSTOMER_PHONE VARCHAR2(20) The CUSTOMER_ID column is the primary key for the table. You need to determine how dispersed your customer base is. Which expression finds the number of different countries represented in the CUSTOMERS table?()
    A

    COUNT(UPPER(country_address))

    B

    COUNT(DIFF(UPPER(country_address)))

    C

    COUNT(UNIQUE(UPPER(country_address)))

    D

    COUNT DISTINCT UPPER(country_address)

    E

    COUNT(DISTINCT (UPPER(country_address)))


    正确答案: A
    解析: 暂无解析

  • 第19题:

    单选题
    The CUSTOMERS table has these columns: CUSTOMER_ID NUMBER(4) NOT NULL CUSTOMER_NAME VARCHAR2(100) NOT NULL STREET_ADDRESS VARCHAR2(150) CITY_ADDRESS VARCHAR2(50) STATE_ADDRESS VARCHAR2(50) PROVINCE_ADDRESS VARCHAR2(50) COUNTRY_ADDRESS VARCHAR2(50) POSTAL_CODE VARCHAR2(12) CUSTOMER_PHONE VARCHAR2(20) A promotional sale is being advertised to the customers in France. Which WHERE clause identifies customers that are located in France?()
    A

    WHERE lower(country_address) = france

    B

    WHERE lower(country_address) = 'france'

    C

    WHERE lower(country_address) IS 'france'

    D

    WHERE lower(country_address) = '%france%'

    E

    WHERE lower(country_address) LIKE %france%


    正确答案: D
    解析: 暂无解析