Which of the following operation is used if we are interested in only certain columns of a table?
A. UNION
B. SELECTION
C. JOIN
D. PROJECTION
Question 2 of 20
Which of the following SQL statements can extract employee names whose salary is $10000 or
higher from the table human_resource?
A. SELECT employee_name, salary FROM human_resource
GROUP BY salary HAVING COUNT(*)>=10000
B. SELECT salary FROM human_resource WHERE employee_name >=10000 GROUP
BY salary
C. SELECT employee_name FROM human_resource WHERE salary>=10000
D. SELECT employee_name, COUNT(*) FROM human_resource
WHERE salary>=10000 GROUP BY employee_name
Question 3 of 20
Question 4 of 20
Question 5 of 20
Question 6 of 20
Question 7 of 20
Which of the following aggregate functions does not ignore nulls in its results?.
A. COUNT (*)
B. MAX
C. COUNT.
D. MIN
Question 8 of 20
The ______ operator is used to compare a value to a list of literals values that have been
specified.
A. IN
B. BETWEEN
C. ANY
D. ALL
Question 9 of 20
Which of the following SQL statements corresponds to the projection operation of the
relational algebra that can extract only the column Continent from the table Country and
eliminate duplicates from the records returned?
Question 10 of 20
Your database contains a table named Purchases. The table includes a DATETIME column
named PurchaseTime that stores the date and time each purchase is made. There is a nonclustered index on the PurchaseTime column. The business team wants a report that displays the
total number of purchases made on the current day. You need to write a query that will return the
correct results in the most efficient manner. Which Transact-SQL query should you use?
A. SELECT COUNT(*)
FROM Purchases
WHERE PurchaseTime >= CONVERT(DATE, GETDATE())
AND PurchaseTime < DATEADD(DAY, 1, CONVERT(DATE, GETDATE()))
B. SELECT COUNT(*)
FROM Purchases
WHERE CONVERT(VARCHAR, PurchaseTime, 112) = CONVERT(VARCHAR,
GETDATE(), 112)
C. SELECT COUNT(*)
FROM Purchases
WHERE PurchaseTime = CONVERT(DATE, GETDATE())
D. SELECT COUNT(*)
FROM Purchases
WHERE PurchaseTime = GETDATE()
Question 11 of 20
Question 12 of 20
Which of the following is the appropriate SQL statement that is used to create Table A from
Persons Table?
A. SELECT name FROM Persons WHERE country LIKE '%Korea%' AND gender = 'F'
AND age = 26
B. SELECT name FROM Persons WHERE country LIKE '%Korea%' AND gender = 'F'
OR age = 26
C. SELECT name FROM Persons WHERE country LIKE '%Korea%' OR gender = ' F'
AND age = 26
D. SELECT name FROM Persons WHERE country LIKE '%Korea%' OR gender = 'F' OR
age = 26
Question 13 of 20
There is a table including the data items shown below. Which of the following SQL statements
should be used to insert a new row in the student table?
\
A. INSERT INTO student VALUES (101, 100 Happy Lane, 2001-06-14, Dave);
B. INSERT INTO student (stud_id, name, graduation) VALUES (101, Dave, 2001-0614);
C. INSERT INTO student VALUES (101, Dave, 100 Happy Lane, 2001-06-14);
D. INSERT INTO student (stud_id, address, name, graduation)
VALUES (101, 100 Happy Lane, Dave, 2001-06-14);
Question 14 of 20
Question 15 of 20
Which of the following product groups can be found when searching the Product Inventory
table for products with a sales price of 500 dollars or more per unit and an inventory of less than
10 units?
Question 16 of 20
Which of the following SQL statements for the stated table Shipment_Record produces the
largest value as a result of its execution?
Question 17 of 20
Question 18 of 20
You are a database developer of a Microsoft SQL Server database. The database contains a table
named Customers that has the following definition:
You need to ensure that the CustomerId column in the Orders table contains only values that exist in the
CustomerId column of the Customer table. Which Transact-SQL statement should you use?
You want to create a table to store Microsoft Word documents. You need to ensure that the
documents must only be accessible via Transact-SQL queries. Which Transact-SQL statement
should you use?
A. ) CREATE TABLE DocumentStore AS FileTable
Question 20 of 20
Part 1 of 1 -
Question 2 of 20
Which is the SQL constraint that allows inputting NULL in a specified column in a
DBMS table but that does not allow inputting the already entered value?
A. PRIMARY KEY
B. CHECK
C. UNIQUE
D. REFERENCES
Question 3 of 20
A. Values
B. Groups
C. Distinct values
D. Columns
Question 4 of 20
A. A, C, D, E
B. A
C. A, C
D. B, D, E
Question 5 of 20
Which of the following is the appropriate SQL statement that is used to create Table
A from Persons Table?
A. SELECT name FROM Persons WHERE country LIKE '%Korea%' AND gender =
'F' AND age = 26
B. SELECT name FROM Persons WHERE country LIKE '%Korea%' OR gender = '
F' AND age = 26
C. SELECT name FROM Persons WHERE country LIKE '%Korea%' AND gender =
'F' OR age = 26
D. SELECT name FROM Persons WHERE country LIKE '%Korea%' OR gender =
'F' OR age = 26
Question 6 of 20
Which of the following SQL statements for the stated table Shipment_Record
produces the largest value as a result of its execution?
Question 7 of 20
Question 8 of 20
A. INSERT
B. DELETE
C. DIVIDE
D. CREATE
Question 9 of 20
A. =
B. LIKE
C. BETWEEN
Question 10 of 20
SQL is:
A. a data sublanguage.
B. a programming language
C. an operating system
D. a DBMS.
Question 11 of 20
Which of the following SQL statements can extract employee names whose salary
is $10000 or higher from the table human_resource?
Question 12 of 20
A. XML
B. DDL
C. HTML
D. DML
Question 13 of 20
There is a student score table shown below with basic and advanced subject codes
which begin with letters B and A respectively. Which of the following SQL
statements can be used to retrieve students, from the score table, whose basic
subject score is 70 or more and examination date is 2007-05-04?
A. of the above.
Question 15 of 20
Which of the following operation is used if we are interested in only certain columns
of a table?
A. PROJECTION
B. JOIN
C. SELECTION
D. UNION
Question 16 of 20
Question 17 of 20
A. XML
B. DDL
C. DML
D. HTML
You develop a database for a travel application. You need to design tables and other
database objects. You create a view that displays the dates and times of the airline
schedules on a report. You need to display dates and times in several international
formats. What should you do?
Question 19 of 20
There is a table including the data items shown below. Which of the following SQL
statements should be used to insert a new row in the student table?
\
B. INSERT INTO student VALUES (101, Dave, 100 Happy Lane, 2001-06-14);
C. INSERT INTO student VALUES (101, 100 Happy Lane, 2001-06-14, Dave);
You are a database developer of a Microsoft SQL Server 2012 database. You are
designing a table that will store Customer data from different sources. The table will
include a column that contains the CustomerID from the source system and a
column that contains the SourceID. A sample of this data is as shown in the
following table.
You need to ensure that the table has no duplicate CustomerID within a SourceID. You also need to
ensure that the data in the table is in the order of SourceID and then CustomerID. Which Transact- SQL
statement should you use?
Question 1 of 20
SQL data definition commands make up a(n) ________________ .
A. XML
B. DDL
C. DML
D. HTML
Question 2 of 20
Which of the following aggregate functions does not ignore nulls in its results?.
A. MAX
B. MIN
C. COUNT.
D. COUNT (*)
Question 3 of 20
A. of the above.
Question 4 of 20
DML is provided for:
Question 5 of 20
A. =
B. LIKE
C. BETWEEN
Question 6 of 20
Which of the following is not the SQL statement?
A. INSERT
B. DELETE
C. DIVIDE
D. CREATE
Question 7 of 20
There is a table including the data items shown below. Which of the following SQL statements should be
used to insert a new row in the student table?
\
The ______ operator is used to compare a value to a list of literals values that have been specified.
A. BETWEEN
B. ALL
C. ANY
D. IN
Question 9 of 20
Which of the following two descriptions on the operation of the stated customer_table is wrong?
Question 11 of 20
You are a database developer of a Microsoft SQL Server database. The database contains a table named
Customers that has the following definition:
You need to ensure that the CustomerId column in the Orders table contains only values that exist in the
CustomerId column of the Customer table. Which Transact-SQL statement should you use?
Question 12 of 20
A. A, C, D, E
B. A
C. A, C
D. B, D, E
Question 14 of 20
department_code
C. SELECT department_code, employee_ID, name FROM A GROUP BY
employee_ID
D. SELECT department_code, employee_ID, name FROM A ORDER BY
employee_ID
Question 15 of 20
Question 16 of 20
You are a database developer of a Microsoft SQL Server 2012 database. You are designing a table that will
store Customer data from different sources. The table will include a column that contains the CustomerID
from the source system and a column that contains the SourceID. A sample of this data is as shown in the
following table.
You need to ensure that the table has no duplicate CustomerID within a SourceID. You also need to
ensure that the data in the table is in the order of SourceID and then CustomerID. Which Transact- SQL
statement should you use?
Question 18 of 20
The statement in SQL which allows change the definition of a table is:
A. Alter.
B. Select
C. Update.
D. Create.
Question 19 of 20
Which of the following SQL statements defines a schema?
A. CREATE
B. SELECT
C. DELETE
D. INSERT
Question 20 of 20
A. Projection operation.
B. Selection operation.
C. Rename operation.
D. Join operation.
Question 1 of 20
SQL data definition commands make up a(n) ________________ .
A. XML
B. DDL
C. DML
D. HTML
Question 2 of 20
Which of the following aggregate functions does not ignore nulls in its results?.
A. MAX
B. MIN
C. COUNT.
D. COUNT (*)
Question 3 of 20
A. of the above.
Question 4 of 20
Question 5 of 20
Which of the following is a comparison operator in SQL?
A. =
B. LIKE
C. BETWEEN
Question 6 of 20
A. INSERT
B. DELETE
C. DIVIDE
D. CREATE
Question 7 of 20
There is a table including the data items shown below. Which of the following SQL statements should be used
to insert a new row in the student table?
\
C. INSERT INTO student VALUES (101, 100 Happy Lane, 2001-06-14, Dave);
The ______ operator is used to compare a value to a list of literals values that have been specified.
A. BETWEEN
B. ALL
C. ANY
D. IN
Question 9 of 20
Which of the following two descriptions on the operation of the stated customer_table is wrong?
Question 10 of 20
Question 11 of 20
You are a database developer of a Microsoft SQL Server database. The database contains a table named
Customers that has the following definition:
You need to ensure that the CustomerId column in the Orders table contains only values that exist in the
CustomerId column of the Customer table. Which Transact-SQL statement should you use?
Question 12 of 20
Question 13 of 20
A. A, C, D, E
B. A
C. A, C
D. B, D, E
Question 14 of 20
Which SQL gain table B from table A?
You are a database developer of a Microsoft SQL Server 2012 database. You are designing a table that will
store Customer data from different sources. The table will include a column that contains the CustomerID from
the source system and a column that contains the SourceID. A sample of this data is as shown in the following
table.
You need to ensure that the table has no duplicate CustomerID within a SourceID. You also need to
ensure that the data in the table is in the order of SourceID and then CustomerID. Which Transact- SQL
statement should you use?
Question 17 of 20
Question 18 of 20
The statement in SQL which allows change the definition of a table is:
A. Alter.
B. Select
C. Update.
D. Create.
Question 19 of 20
A. CREATE
B. SELECT
C. DELETE
D. INSERT
Question 20 of 20
AS clause is used in SQL for:
A. Projection operation.
B. Selection operation.
C. Rename operation.
D. Join operation.
Question 1 of 20
Which of the following aggregate functions does not ignore nulls in its results?.
A. COUNT.
B. MAX
C. COUNT (*)
D. MIN
Question 2 of 20
Which of the following product groups can be found when searching the Product Inventory table for products
with a sales price of 500 dollars or more per unit and an inventory of less than 10 units?
A. Large refrigerator, medium refrigerator, small refrigerator, air purif ier, and
air conditioner
B. Medium refrigerator, small refrigerator, portable refrigerator, coffee maker,
and air conditioner
Question 3 of 20
Which of the following operations extracts specific columns from tables in a relational database?
A. Projection
B. Union
C. Selection
D. Join
Question 4 of 20
Which one of the following is not true for a view?
Question 5 of 20
You develop a database for a travel application. You need to design tables and other database objects. You
create a view that displays the dates and times of the airline schedules on a report. You need to display dates
and times in several international formats. What should you do?
Question 6 of 20
Which of the following operation is used if we are interested in only certain columns of a table?
A. SELECTION
B. UNION
C. PROJECTION
D. JOIN
Question 7 of 20
Question 8 of 20
Which of the following SQL statements for the stated table Shipment_Record produces the largest value as a
result of its execution?
Question 9 of 20
A. A, C, D, E
B. A, C
C. B, D, E
D. A
Question 10 of 20
Count function in SQL returns the number of :
A. Values
B. Groups
C. Distinct values
D. Columns
Question 11 of 20
Question 12 of 20
The ______ operator is used to compare a value to a list of literals values that have been specified.
A. BETWEEN
B. ANY
C. ALL
D. IN
Question 13 of 20
Question 14 of 20
SQL data definition commands make up a(n) ________________ .
A. XML
B. DML
C. DDL
D. HTML
Question 15 of 20
Which of the following is the appropriate SQL statement that is used to create Table A from Persons Table?
A. SELECT name FROM Persons WHERE country LIKE '%Korea%' OR gender = '
F' AND age = 26
B. SELECT name FROM Persons WHERE country LIKE '%Korea%' AND gender =
'F' OR age = 26
C. SELECT name FROM Persons WHERE country LIKE '%Korea%' AND gender =
'F' AND age = 26
D. SELECT name FROM Persons WHERE country LIKE '%Korea%' OR gender =
'F' OR age = 26
Question 16 of 20
employee_ID
B. SELECT department_code, employee_ID, name FROM A GROUP BY
department_code
C. SELECT department_code, employee_ID, name FROM A ORDER BY
employee_ID
D. SELECT department_code, employee_ID, name FROM A ORDER BY
department_code
Question 17 of 20
Which of the following two descriptions on the operation of the stated customer_table is wrong?
Question 18 of 20
You are a database developer of a Microsoft SQL Server 2012 database. You are designing a table that will
store Customer data from different sources. The table will include a column that contains the CustomerID from
the source system and a column that contains the SourceID. A sample of this data is as shown in the following
table.
You need to ensure that the table has no duplicate CustomerID within a SourceID. You also need to
ensure that the data in the table is in the order of SourceID and then CustomerID. Which Transact- SQL
statement should you use?
Question 19 of 20
Which of the following SQL statements can extract employee names whose salary is $10000 or higher from
the table human_resource?
Question 20 of 20
The statement in SQL which allows change the definition of a table is:
A. Select
B. Update.
C. Alter.
D. Create.