niusouti.com

创建一个名为‘Customers’的新表,同时要求新表中包含表‘clients’的所有记录,sql语句是()。A、Select * into customers from clientsB、Select into customers from clientsC、Insert into customers select * from clientsD、Insert customers select * from clients

题目

创建一个名为‘Customers’的新表,同时要求新表中包含表‘clients’的所有记录,sql语句是()。

  • A、Select * into customers from clients
  • B、Select into customers from clients
  • C、Insert into customers select * from clients
  • D、Insert customers select * from clients

相似考题
更多“创建一个名为‘Customers’的新表,同时要求新表中包含表‘clients’的所有记录,sql语句是()。A、Select * into customers from clientsB、Select into customers from clientsC、Insert into customers select * from clientsD、Insert customers select * from clients”相关问题
  • 第1题:

    查询“读者”表的所有记录并存储于临时表文件one中的SQL语句是( )。

    A.SELECT*FROM读者INTO CURSOR one

    B.SELECT*FROM读者To CURSOR one

    C.SELECT*FROM读者INTO CURSOR DBF one

    D.SELECT*FROM读者To CURSoR DBF one


    正确答案:A
    A。【解析】将查询结果存放在临时文件中应使用短语INTOCURSORCursorName语句,其中CursorName是临时文件名,该语句将产生的临时文件是一个只读的.dbf文件,当查询结束后该临时文件是当前文件。

  • 第2题:

    公司有一个客户的数据表,此表的建立语句如下:

    CREATE TABLE Customers

    (CustomerID int NOT NULL,

    CustomerName varchar(50) NOT NULL,

    ContactName varchar(30) NULL,

    Phone varchar(20) NULL,

    Country varchar(30) NOT NULL,

    CONSTRAINT PK_Customers PRIMARY KEY(CustomerID)

    )

    大部分的国家或地区只包含2-3个客户,而一些国家包括多于20个客户。现在公司想对客户数量在10(含10)个以上的国家进行广告宣传,你使用( )语句将这些国家列出。

    A SELECT Country FROM Customers

    GROUP BY Country HAVING COUNT (Country)>=10

    B SELECT TOP 10 Country FROM Customers

    C SELECT TOP 10 Country FROM Customers

    FROM (SELECT DISTINCT Country FROM Customers) AS X

    GROUP BY Country HAVING COUNT(*)>= 10

    D SET ROWCOUNT 10

    SELECT Country, COUNT (*) as “NumCountries”

    FROM Customers

    GROUP BY Country ORDER BY NumCountries, Desc


    参考答案A

  • 第3题:

    查询学生表 S 的全部记录并 存储 于临时表文件 one 中的 SQL 命令是

    A)SELECT * FROM 学生表 INTO CURSOR one

    B)SELECT * FROM 学生表 TO CURSOR one

    C)SELECT * FROM 学生表 INTO CURSOR DBF one

    D)SELECT * FROM 学生表 TO CURSOR DBF one


    正确答案:A

  • 第4题:

    利用SQL语句,检索仓库中至少有一名职工的仓库信息,正确的命令是

    A.SELECT*FROM仓库表WHEREIN;(SELECT仓库号FROM职工表)
    B.SELECT*FROM仓库表WHERENOTIN;(SELECT仓库号FROM职工表)
    C.SELECT*FROM仓库表WHERE仓库号EXISTS;(SELECT*FROM职工表WHERE仓库号=仓库表.仓库号)
    D.SELECT*FROM仓库表WHEREEXISTS;(SELECT*FROM职工表WHERE仓库号=仓库表.仓库号)

    答案:D
    解析:

  • 第5题:

    "在下面给出的SQL语句中,()代码会导致语句的失败。 1 SELECT LastName,FirstName,Email 2 From Customers,EmailUsers 3 ON Customers.UserName=EmailUsers.UserName 4 ORDER BY LastName ASC"

    • A、1
    • B、2
    • C、3
    • D、4

    正确答案:C

  • 第6题:

    You need to generate a list of all customer last names with their credit limits from the CUSTOMERS table. Those customers who do not have a credit limit should appear last in the list. Which two queries would achieve the required result?()

    • A、SELECT cust_last_name, cust_credit_limit FROM customers ORDER BY cust_credit_limit DESC
    • B、SELECT cust_last_name, cust_credit_limit FROM customers ORDER BY cust_credit_limit
    • C、SELECT cust_last_name, cust_credit_limit FROM customers ORDER BY cust_credit_limit NULLS LAST
    • D、SELECT cust_last_name, cust_credit_limit FROM customers ORDER BY cust_last_name, cust_credit_limit NULLSLAST

    正确答案:B,C

  • 第7题:

    现有客户表customers(主键:客户编号cid),包含10行数据,订单表orders(外键:客户编号cid),包含6条数据。执行sql语句:select * from customers right outer join orders on customers.cid=orders.cid。最多返回()条记录。

    • A、10
    • B、6
    • C、4
    • D、0

    正确答案:B

  • 第8题:

    创建一个名为’catt’的新表,要求该表包含’kehu’表的所有记录,应使用的SQL语句是()

    • A、select*intocatt where from kehu
    • B、select*into catt from kehu
    • C、insert into catt select*from kehu
    • D、inser tinto catt from select*from kehu

    正确答案:B

  • 第9题:

    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

  • 第10题:

    单选题
    Click the Exhibit button and examine the data from the ORDERS and CUSTOMERS tables. Which SQL statement retrieves the order ID, customer ID, and order total for the orders that are placed on the same day that Martin placed his orders?()
    A

    SELECT ord_id, cust_id, ord_total FROM orders, customers WHERE cust_name='Martin' AND ord_date IN ('18-JUL-2000','21-JUL-2000');

    B

    SELECT ord_id, cust_id, ord_total FROM orders WHERE ord_date IN (SELECT ord_date FROM orders WHERE cust_id = (SELECT cust_id FROM customers WHERE cust_name = 'Martin'));

    C

    SELECT ord_id, cust_id, ord_total FROM orders WHERE ord_date IN (SELECT ord_date FROM orders, customers WHERE cust_name = 'Martin');

    D

    SELECT ord_id, cust_id, ord_total FROM orders WHERE cust_id IN (SELECT cust_id FROM customers WHERE cust_name = 'Martin');


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

  • 第11题:

    单选题
    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
    解析: 暂无解析

  • 第12题:

    单选题
    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: 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;


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

  • 第13题:

    有如下SQL语句: SELECT姓名FROM学生表WHERE学号IN; (SELECT学号FROM成绩表WHERE成绩>90) 下列哪条命令与该SQL语句等价

    A.SELECT姓名FROM学生表WHERE EXISTS; (SELECT学号FROM成绩表WHERE成绩>90)

    B.SELECT姓名FROM学生表WHERE EXISTS; (SELECT学号FROM成绩表WHERE学号=学生表.学号AND成绩>90)

    C.SELECT姓名FROM学生表WHERE学号EXISTS; (SELECT学号FROM成绩表WHERE学号=学生表.学号AND成绩>90)

    D. SELECT姓名FROM学生表WHERE学号=; (SELECT学号FROM成绩表WHERE成绩>90)


    正确答案:B
    解析:IN是包含运算,此处子查询中得到多个结果,记录不惟一,因此不用“=”运算符;EXISTS是谓词,用来检查在子查询中时候有结果返回。

  • 第14题:

    Click the Exhibit button and examine the data from the ORDERS and CUSTOMERS tables.Evaluate the SQL statement:SELECT *FROM ordersWHERE cust_id = (SELECT cust_idFROM customersWHERE cust_name = ‘Smith‘);What is the result when the query is executed?()

    A.A

    B.B

    C.C

    D.D

    E.E


    参考答案:A

  • 第15题:

    查询“成绩”表的所有记录并存储于数组arrl中的SQL语句是( )。

    A)SELECT﹡FROM成绩INTO ARRAY arrl

    B)SELECT﹡FROM成绩TO CURSOR arrl

    C)SELECT﹡FROM成绩TO ARRAY arrl

    D)SELECT﹡FROM成绩INTO CURSOR arrl


    正确答案:A
    在SQL语句中,使用短语INTO ARRAY ArrayName可以将查询结果存放到数组中,ArrayName可以是任意的数组变量名。

  • 第16题:

    创建一个名为"Customers"的新表,同时要求该表中包含表"clients"的所有记录,SQL语句是()。

    • A、SELECT * INTO customers FROM clients
    • B、SELECT INTO customers FROM clients
    • C、INSERT INTO customers SELECT * FROM clients
    • D、INSERT customers SELECT * FROM clients

    正确答案:A

  • 第17题:

    Which is the most accurate statement regarding the business requirements development service component in the prepare phase. Select exactly 1 answer(s) from the following:()。

    • A、Determine the appropriate cooling temperature for a customers server room
    • B、Analyze the customers business requirements for a proposed solution
    • C、Analyze a customers ongoing operational requirements
    • D、Identify a customers technology requirements

    正确答案:B

  • 第18题:

    有如下SQL语句:下列哪条命令与该SQL语句等价() SELECT姓名FROM学生表WHERE学号IN; (SELECT学号FROM成绩表WHERE成绩>90)

    • A、SELECT姓名FROM学生表WHEREEXISTS;(SELECT学号FROM成绩表WHERE成绩>90)
    • B、SELECT姓名FROM学生表WHEREEXISTS;(SELECT学号FROM成绩表WHERE学号=学生表.学号AND成绩>90)
    • C、SELECT姓名FROM学生表WHERE学号EXISTS;(SELECT学号FROM成绩表WHERE学号=学生表.学号AND成绩>90)
    • D、SELECT姓名FROM学生表WHERE学号=;(SELECT学号FROM成绩表WHERE成绩>90)

    正确答案:B

  • 第19题:

    创建一个名为‘Customers’的新表,同时要求新表中包含表‘clients’的所有记录,sql语句是()。

    • A、Select*into customers from clients
    • B、Select into customers from clients
    • C、Insert into customers select*from clients
    • D、Insert customers select*from clients

    正确答案:A

  • 第20题:

    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

  • 第21题:

    单选题
    创建一个名为‘Customers’的新表,同时要求新表中包含表‘clients’的所有记录,sql语句是()。
    A

    Select*into customers from clients

    B

    Select into customers from clients

    C

    Insert into customers select*from clients

    D

    Insert customers select*from clients


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

  • 第22题:

    单选题
    创建一个名为’catt’的新表,要求该表包含’kehu’表的所有记录,应使用的SQL语句是()
    A

    select*intocatt where from kehu

    B

    select*into catt from kehu

    C

    insert into catt select*from kehu

    D

    inser tinto catt from select*from kehu


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

  • 第23题:

    单选题
    创建一个名为"Customers"的新表,同时要求该表中包含表"clients"的所有记录,SQL语句是()。
    A

    SELECT * INTO customers FROM clients

    B

    SELECT INTO customers FROM clients

    C

    INSERT INTO customers SELECT * FROM clients

    D

    INSERT customers SELECT * FROM clients


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

  • 第24题:

    ( 难度:中等)在Hive中,以下哪个SQL语句是错误的
    A.hive> SELECT ID, NAME, o.AMOUNT, o.DATE
    > FROM CUSTOMERS c
    > LEFT OUTER JOIN ORDERS o
    > ON (ID = o.CUSTOMER_ID);
    B.hive> SELECT ID, NAME, o.AMOUNT, o.DATE
    > FROM CUSTOMERS c
    > RIGHT OUTER JOIN ORDERS o
    > ON (ID = o.CUSTOMER_ID);
    C.hive> SELECT ID, NAME, o.AMOUNT, o.DATE
    > FROM CUSTOMERS c
    > FULL OUTER JOIN ORDERS o
    > ON (ID = o.CUSTOMER_ID);
    D.hive> SELECT ID, NAME, o.AMOUNT, o.DATE
    > FROM CUSTOMERS c
    > FULL OUTER JOIN ORDERS o
    > ON (ID = o.CUSTOMER_ID OR Name = o.Name);

    答案:D