wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

TrainingQIZZ(HCM22_FR_NET_01)

Total questions: 32

Worksheet time: 16mins

Name
Class
Date
1.

[LinhTP8] What is the result of the below query: SELECT SUBSTRING('DOTNET', 1, 3) AS 'Substring'  

a)

DOT

b)

OTN

c)

OT

d)

None of the above.

2.

[LinhTP8] The SELECT statement must include which of the following clause:

a)

SELECT clause

b)

FROM clause

c)

Both A and B.

d)

None of the above.

3.

[LinhTP8] Which of the following is true?

a)

BUILT-IN functions in SQL Server are Nondeterministic.

b)

ISNULL function in SQL Server is Deterministic.

c)

All of the above.

d)

None of the above.

4.

[ThanhVH6]Which SQL function is used to count the number of rows in a SQL query?

a)

NUMBER()

b)

COUNT()

c)

AVG()

d)

SUM()

5.

[ThanhVH6]The FROM SQL clause is used to…

a)

Specify range for search condition

b)

Specify search condition

c)

Specify what table we are selecting or deleting data from.

6.

[ThanhVH6]The UNION SQL clause can be used with…

a)

The UPDATE clause only

b)

The SELECT clause only

c)

The DELETE and UPDATE clauses

d)

None of the other three

7.

If no ASC or DESC is specified after the ORDER BY clause, which keyword is used by default?

a)

ASC

b)

DESC

c)

DOWN

d)

No default value

8.

BETWEEN in SQL is used to...

a)

Specify a column as primary key

b)

Specify the tables to use

c)

Specify a range to test

9.

The UNION statement is used to combine results from multiple queries into a single result set.

a)

True

b)

False

10.

[ViLTT1]. List the different privileges a user can grant to other users

a)

SELECT, CONNECT, RESOURCES

b)

SELECT, FROM, WHERE

c)

DELETE, TRUNCATE

d)

UNION, MINUS, UNION ALL

11.

[LongNT62] Which SQL statement is used to return only different values?

a)

SELECT DIFFERENT

b)

SELECT DISTINCT

c)

SELECT UNIQUE

12.

[LongNT62] Which SQL keyword is used to sort the result-set?

a)

ORDER

b)

SORT

c)

ORDER BY

d)

SORT BY

13.

[LongNT62] With SQL, how do you select a column named "FirstName" from a table named "Persons"?

a)

SELECT Persons.FirstName

b)

EXTRACT FirstName FROM Persons

c)

SELECT FirstName FROM Persons

14.

[KhoaNA14] The following virtual table does not exist in SQL server

a)

Deleted

b)

Inserted

c)

Tất cả đều tồn tại

d)

Updated

15.

[ThaoTT26]_Có mấy loại Join trong sql?

a)

(5 ) inner join, outer join, across join, self join, excluding join

b)

(4)inner join, outer join, across join, self join,

c)

(3) inner join, outer join, across join

d)

(2) outer join, across join

16.

[ThaoTT26] Left Join thuộc loại nào?

a)

Inner Join

b)

Outer Join

c)

Across Join

17.

Which operator is used to select values within a range?

a)

BETWEEN  

b)

WITHIN

c)

RANGE

18.

[ThangVT5] How many types of "Join" in SQL?

a)

3

b)

4

c)

5

d)

6

19.

The OR operator displays a record if ANY conditions listed are true. The AND operator displays a record if ALL of the conditions listed are true

a)

True

b)

False

20.

[TinNH7] Please choose the option corresponding to the statement used to create the Database in SQL

a)

Create table name_database

b)

Update database name_database

c)

Create database name_database

d)

Create data name_database

21.

The NOT NULL constraint enforces a column to not accept NULL values.

a)

True  

b)

False

22.

[TinNH7]To display the table in ascending order of the column ‘‘Name’’, in the select statement we use which of the following clauses:

a)

Having Name asc

b)

Group by Name asc

c)

Order by Name desc

d)

Order by Name asc

23.

[KhoaNA14] Which of the following statements is not correct about ORDER BY .?

a)

ORDER BY is used to sort and return data from the SELECT in the command

b)

When using ORDER BY, there is no need to write the sort direction

c)

ORDER BY can sort by multiple columns

d)

ORDER BY can be sorted in descending order using the keyword ASC

24.

Restore Database <Ten_CSDL> from disk = '<Backup file location + file name>

Is the question correct to delete DATABASE?

a)

YES

b)

NO

25.

[KhoaNA14] Select true expression !

a)

Stored Procedure trong sql server có chứa các câu trúc điều khiển (IF, FOR, WHILE, SWITCH..CASE).

b)

Stored Procedure trong sql server có các kiểu dữ liệu như trong Dec-C.

c)

Stored Procedure trong sql server có thể nhận vào các tham số cũng như trả về giá trị thông qua tham số.

d)

Có thể mã hóa code của Stored Procedure trong sql server để người khác có thể xem nhưng không thể chỉnh sửa.*

26.

[ThangVT5] If "n" is the number of columns listed in the ROLLUP,

there will be ...... levels of subtotals

a)

n

b)

n+1

c)

n-2

d)

n+2

27.

[ThangVT5] If "n" is the number of columns listed in the CUBE, there will be ... subtotal combinations

a)

3^n

b)

n^1

c)

2^n

d)

n^2

28.

[ViLTT1]. What TCP/IP port does the SQL server run on?

a)

1024

b)

1433

c)

88

d)

80

29.

[TinNH7] Please select the Select statement that performs correctly in the Select statements below:

a)

SELECT * FROM t1 ORDER BY id DESC;

b)

SELECT * FROM t1 WHERE BY id;

c)

SELECT * WHERE t1 ORDER BY id ASC;

d)

SELECT % FROM t1 WHERE BY id;

30.

[ViLTT]. Suppose a Student column has 2 columns, Name and Marks. How to get the scores of the top 3 students?

a)

SELECT Name, Marks FROM Student s1 where 3 >= (SELECT COUNT(*) FROM Student s1.marks = s2.marks)

b)

SELECT Name, Marks FROM Student s1 where 3 <> (SELECT COUNT(*) FROM Student s1.marks = s2.marks)

c)

SELECT Name, Marks FROM Student s1 where 3 <= (SELECT COUNT(*) FROM Student s1.marks = s2.marks)

d)

SELECT Name, Marks FROM Student s1 where 3 != (SELECT COUNT(*) FROM Student s1.marks = s2.marks)

31.

DECLARE @variable_name datatype [ = initial_value ],

@column_name datatype [ = initial_value ],...;

Is the question to create variable correct?

a)

YES

b)

NO,Correct is :

DECLARE @variable_name datatype [ = initial_value ],

@variable_name datatype [ = initial_value ],...;

32.

(SELECT* FROM table_name WHERE _Conditional);

is a subquery in SQL?

a)

YES

b)

NO