Wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

оч много

Total questions: 134

Worksheet time: 1hrs 7mins

Name
Class
Date
1.

The database has a Courses table with the following columns: course id, course name, number

of credits. Select which of the following constraints can be implemented for this table?

a)

The number of credits can be from 1 to 6

b)

books for each course should be available in the university library

c)

course grades must range from 0 to 100%

d)

courses must last 3 months

2.

The database has a Schedule table with the following columns: schedule_id, course_id,

teacher_id, group_id, time, room, day_of_week. Select which of the following constraints can be

implemented for this table?

a)

lesson time can be from 08:00 to 22:00

b)

lessons should be interesting

c)

students must attend all lessons

d)

after each lesson, students must complete homework

3.

The Books table has the following columns: ISBN - unique code of the book edition, title of

the book, author of the book, number of pages. Which of these columns can be the Primary key?

a)

ISBN

b)

title

c)

author

d)

pages

4.

A primary key for an entity is

a)

unique attribute

b)

any attribute

c)

first row

d)

type of relationship

5.

Choose the right order of the database design phases

a)

Subject area analysis, Conceptual Design, Logical Design, Physical Design

b)

Subject area analysis, Logical Design, Conceptual Design, Physical Design

>Conceptual Design, Logical Design, Physical Design, Queries Implementation

c)

Conceptual Design, Logical Design, Physical Design, Queries Implementation

d)

Conceptual Design, Logical Design, Physical Design, DBMS Selection

6.

Database is a collection of…

a)

data

b)

programs

c)

modules

d)

none of the given

7.

DBMS stands for …

a)

Database Management System

b)

None of the given

c)

Database Basic Management System

d)

Database Administrator System

8.

A teacher teaches one or more groups, each of which is taught by one or more teachers. The

TEACHERS table has teacher_id, teacher_name columns. The GROUPS table has group_id, name

columns. Identify a table with a Foreign Key(s) for the relationship between TEACHERS and GROUPS

tables.

a)

associative table between TEACHERS and GROUPS tables

b)

TEACHERS

c)

GROUPS

d)

in the TEACHERS table or in the GROUPS table - both options are correct

9.

‹question> A teacher may be assigned with exactly one position. A position must be assigned to one or many teachers. The TEACHERS table has teacher id, teacher name, birthdate columns. The

POSITIONS table has position id, position name columns. Identify a type of the relationship between TEACHERS and POSITIONS entities

a)

one (positions)-to-many (teachers)

b)

one (teachers)-to-many (positions)

c)

one (teachers)-to-one (positions)

d)

many (teachers)-to-many (positions)

10.

A teacher may be assigned with exactly one position. A position must be assigned to one or

more teachers. The TEACHERS table has teacher id, teacher name, birthdate columns. The POSITIONS

table has position_id, position_name columns. Identify a table with a Foreign Key(s) for the relationship

between TEACHERS and POSITIONS tables

a)

TEACHERS and POSITIONS tables.

b)

TEACHERS

c)

POSITIONS

d)

associative table between TEACHERS and POSITIONS tables

e)

in the TEACHERS table or in the POSITIONS table - both options are correct

11.

A teacher teaches one or more groups, each of which is taught by one or more teachers. The

TEACHERS table has teacher_id, teacher_name columns. The GROUPS table has group_id, name

columns. Identify a type of the relationship between TEACHERS and GROUPS tables

a)

many (teachers)-to-many (groups)

b)

one (teachers)-to-many (groups)

c)

one (groups)-to-many (teachers)

d)

one (teachers)-to-one (groups)

12.

A teacher teaches one or more subjects, each of which is taught by one or more teachers.

Definitions of the entities are: Teachers (teacher_id, name, birthdate), Subjects (subject_id, name,

description). Identify a type of the relationship between TEACHERS and SUBJECTS tables.

a)

many (teachers)-to-many (subjects)

b)

one (teachers)-to-one (subjects)

c)

one (teachers)-to-many (subjects)

d)

one (subjects)-to-many (teachers)

13.

A teacher teaches one or more subjects, each of which is taught by one or more teachers.

Definitions of entities are: Teachers (teacher_id, name, birthdate), Subjects (subject_id, name,

description). Identify a table with a Foreign Key(s) for the relationship between TEACHERS and

SUBJECTS tables.

a)

associative table between Teachers and Subjects tables

b)

Teachers

c)

Subjects

d)

in the Teachers table or in the Subjects table - both options are correct

14.

Entities Groups and Subjects have a many-to-many relationship type. For this reason a

new associative table between them should be created - Schedule table. Definitions of tables are: Groups

(group_code (PK), group_name), Subjects (subject_code (PK), subject_name, description). Identify

attributes in the Schedule table

a)

schedule_id (PK), group_code (FK), subject_code (FK)

b)

schedule_id (PK), group_name (FK), subject_name (FK)

c)

schedule_id (PK), group_code (FK)

d)

schedule_id (PK), subject_name (FK)

15.

Determine the relationship type between Courses and Teachers entities by the description:

"One course can be taught by many teachers, and one teacher can teach many courses"

a)

many-to-many

b)

one-to-one

c)

one-to-many

d)

none of the given

16.

Determine the relationship type between Students and Groups entities by the description:

"One student can be enrolled only in one group, and one group contains many students".

a)

one-to-many

b)

one-to-one

c)

many-to-many

d)

none of the given

17.

Determine the relationship type between Students and Readers entities by the description:

"One student has only one reader's card, and one reader's card can belong to only one student".

a)

one-to-one

b)

one-to-many

c)

many-to-many

d)

none of the given

18.

In an ER-diagram an entity is represent by a

a)

Rectangle

b)

Ellipse

c)

Rhombus

d)

Circle

19.

What type of

relationship is described by the following rule? For one instance of entity A.

there

exists one or many instances of entity B; and for one instance of entity B, there exists one or many

instances of entity A.

a)

many-to-many

b)

one-to-many

c)

one-to-one

20.

What type of relationship is described by this rule? For one instance of entity A, there exists

one or many instances of entity B; but for one instance of entity B, there exists one instance of entity A…

a)

one-to-many

b)

many-to-many

c)

one-to-one

21.

What type of relationship is described by this rule? One instance of entity A can be associated

with one instance of entity B. and one instance of entity B can be associated with one instance of entity A

a)

one-to-one

b)

one-to-many

c)

many-to-many

22.

A relation in which the intersection of each row and column contains one and only one value

is said to be in

a)

1NF

b)

0NF

c)

2NF

d)

3NF

23.

An entity with atomic attributes that has no partial functional dependencies is in … form

a)

2NF

b)

0NF

c)

3NF

d)

1NF

24.

Can a Foreign key be duplicate?

a)

Yes

b)

No

25.

In an ER diagram an entity is represent by a …

a)

Rectangle

b)

Rhombus

26.

Table is synonymous with the term …

a)

Relation

b)

Field

c)

Column

d)

Record

27.

The another name for a row is …

a)

Record

b)

Relationship

c)

Entity

d)

Attribute

28.

The column of a table is a synonym for …

a)

Attribute

b)

Relationship

c)

Tuple

d)

Entity

29.

… operator is used to convert from one data type into another.

a)

::

b)

%

30.

Select the functional dependency according to the table description: Teachers (teacher id

(PK), last_name, department_id)

a)

full

b)

partial

c)

transitive

d)

none of the given

31.

To check if a value in a column is null, the … operator is used.

a)

IS NULL

b)

BETWEEN

32.

Table names can be aliased to another using the … operator.

a)
AS
b)

CAST

33.

Select the functional dependency according to the table description: Students (study id (PK).

last_name, group_id)

a)

full

b)

partial

c)

transitive

d)

none of the given

34.

Select the functional dependency according to the table description: Groups (group_id (PK),

group_name)

a)

full

b)

partial

c)

transitive

d)

none of the given

35.

Select the functional dependency according to the table description: Courses (course id (PK),

course_name, credits)

a)

full

b)

partial

c)

transitive

d)

none of the given

36.

Select the Normal Form by the table description: Teachers (teacher id (PK), last_name,

department_id)

a)

3NF

b)

1NF

c)

2NF

d)

0NF

37.

Select the Normal Form by the table description: Courses (course id (PK), major id (PK), course name, credits, majorname)

a)

3 NF

b)

2 NF

c)

1 NF

d)

0 NF

38.

Select the Normal Form by the table description: Groups (group_id (PK), group_name,

advisor id, advisor last name)

a)

2 NF1

b)

0 NF1

c)

1 NF

d)

3 NF

39.

Select the Normal Form by the table description: Students (stud_id (PK), last_name,

subject ids)

a)

0 NF

b)

1 NF

c)

2 NF

d)

3 NF

40.

Answer if the next table has a partial dependency: Courses (course_id (PK), major_id (PK),

course_name, credits, major name)

a)

yes

b)

no

41.

Answer if the next table has a partial dependency: Schedule (teacher id (PK), groupid

(PK).

course id (PK), time, room)

a)

no

b)

yes

42.

Answer if the next table has a partial dependeney: Teachers (teacher_id (PK), last_name,

department id)

a)

no

b)

yes

43.

Answer if the next table has a partial dependency: Groups (group_id (PK), group_name,

adviser_id, adviser_last name)

a)

no

b)

yes

44.

A functional dependency is a logical relationship between or among …

a)

attributes

b)

rows

c)

tables

d)

databases

45.

Select the Normal Form by the table description: Teachers (teacher id (PK), Name, email,

department id, department name)

a)

2NF

b)

1NF

c)

0NF

d)

3NF

46.

Select the Normal Form by the table description: Students (study id (PK), group_id (PK).

Name, email, group_name)

a)

2NF

b)

0NF

c)

3NF

d)

1NF

47.

Select the Normal Form by the table description: Students (stud id (PK), group id, Iname,

email, group_name)

a)

2NF

b)

0NF

c)

3NF

d)

1NF

48.

Select the Normal Form by the table description: Schedule (teacher_id (PK), subject_id (PK).

teacher Name, time, subject name)

a)

1NF

b)

2NF

c)

3NF

d)

0NF

49.

Select the Normal Form by the table description: Teachers (teacher_id (PK), department_id

((PK), teacher Jname, email, department name)

a)

2NF

b)

0NF

c)

3NF

d)

1NF

50.

Select the Normal Form by the table description: Schedule (teacher_id (PK), subject_id,

teacher Name, time, subject_name)

a)

2NF

b)

0NF

c)

3NF

d)

1NF

51.

Select the Normal Form by the table description: Schedule (sch id (PK), teacher id,

subject_id, time)

a)

2NF

b)

1NF

c)

3NF

d)

0NF

52.

Select the Normal Form by the table description: Departments (department id (PK), name,

teacher Just names)

a)

2NF

b)

1NF

c)

0NF

d)

3NF

53.

Third normal form is based on the concept of…

a)

Transitive dependency

b)

Foreign dependency

c)

Partial dependency

d)

Primary dependency

54.

Which normal form is considered "good" for relational database design?

a)

3NF

b)

1NF

c)

0NF

d)

2NF

55.

Complete the code to create the table Teachers (teach id (PK), last_name, depart_id (FK)):

CREATE TABLE Teachers(teach_id int PRIMARY KEY, last name varchar(20), depart_id int,

(depart_id) REFERENCES Departments(depart_id));

a)

FOREIGN KEY

b)

KEY

c)

PRIMARY KEY

d)

FOREIGN

56.

Complete the code to create the table Departments (deptid (PK), dep_name): CREATE TABLE

Departments(depid int

dep_name varchar(15));

a)

PRIMARY KEY

b)

PRIMARY

c)

KEY

d)

FOREIGN KEY

57.

Complete the code to create the table Students (stud_id (PK), last_name): CREATE TABLE

Students(stud_id int, last name varchar(20),

(stud_id));

a)

PRIMARY KEY

b)

FOREIGN KEY

c)

KEY

d)

PRIMARY

58.

Complete the code to create the table Groups (group id (PK), group name):

Groups( group_id int PRIMARY KEY, group_name varchar(20));

a)

CREATE TABLE

b)

CREATE

c)

TABLE

d)

ALTER TABLE

59.

The SQL command which allows to change the structure of a table is

a)

ALTER TABLE

b)

CREATE TABLE

c)

DROP TABLE

d)

ALTER DATABASE

60.

Which of the following SQL statements can be used to create a table?

a)

CREATE TABLE

b)

ALTER TABLE

c)

ADD TABLE

d)

CREATE DATABASE

61.

Complete the code to create the table Courses (course id (PK), name): CREATE TABLE

Courses( course id int

name varchar(10));

a)

PRIMARY KEY

b)

PRIMARY

c)

KEY

d)

FOREIGN KEY

62.

Which of the following language is used to specify database structure?

a)

Data Definition Language

b)

Data Development Language

c)

Data Manipulation Language

d)

Data Management Language

63.
a)

INSERT INTO

b)

UPDATE

c)

CREATE TABLE

d)

DELETE FROM

64.

Complete the code: DELETE FROM Students___stud id=2:

a)

WHERE

b)

WHEN

c)

WITH

d)

AND

65.

Complete the code for the following table Departments (depart_id (PK), name): UPDATE Departments___name='IT WHERE depart_id=1;

a)

SET

b)

WHERE

c)

FOR

d)

GET

66.

Complete the code for the following table Faculties (facult_id (PK), name):___Faculties SET name='Information Technology 'WHERE name='IT';

a)

UPDATE

b)

INSERT

c)

CHANGE

d)

ALTER TABLE

67.

Complete the code for the following table Faculties (faculty id (PK), name): DELETE FROM

Faculties___facult_jd=1;

a)

WHERE

b)

SET

c)

WITH

d)

WHEN

68.

Complete the code for the following table Groups (group_id (PK), name):___SET

name='Database Design' WHERE group_id==1;

a)

UPDATE Groups

b)

ALTER TABLE Groups

c)

UPDATE

d)

Groups

69.

Complete the code for the following table Groups (group_id (PK), name): DELETE FROM

Groups___group_id 1;

a)

WHERE

b)

WHEN

c)

WITH

d)

DROP

70.

Complete the code for the following table Students (stud_id (PK), lastname): DELETE FROM

Students WHERE…=1

a)

stud_id

b)

student_number

c)

id

d)

PK

71.

Complete the code for the following table Subjects (subj id (PK), name, credits): UPDATE

Subjects SET credits=5___credits=3;

a)

WHERE

b)

WHEN

c)

IF

d)

WITH

72.

Complete the code for the following table Subjects (subj id (PK), name, credits):___SETcredits=credits+1;

a)

UPDATE Subjects

b)

UPDATE

c)

Subjects

d)

ALTER TABLE Subjects

73.

Complete the code for the following table: Faculties (facult_id (PK), name): INSERT INTO___(1, IT):

a)

Faculties VALUES

b)

Faculties

c)

VALUES

d)

TABLE Faculties

74.

Complete the code for the following table Groups (group_id (PK), group_name):___VALUES (1, "SIS-01");

a)

INSERT INTO Groups

b)

INSERT Groups

c)

ADD ROW Groups

d)

UPDATE Groups

75.

Complete the code for the following table Groups (group_id (PK), group_name):___INTO Groups VALUES (I, 'SIS-01");

a)

INSERT

b)

UPDATE

c)

DELETE

d)

ADD ROW

76.

Complete the code for the following table Schedule (sch_id (PK), group_id, subj_id, teach_id,

time, room): INSERT INTO Schedule (sch_id group_id, subj_id,___VALUES (1, 1, 1, '08:00');

a)

time

b)

room

c)

date

d)

teach_id

77.

Complete the code to create the table Departments (dep_id (PK), name, faculty_id), where

faculty_id is a FK to the table Faculties: CREATE TABLE Departments( dep id int PRIMARY KEY, name

varchar(10), faculty_id int___Faculties (faculty_id));

a)

REFERENCES

b)

FOREIGN KEY

c)

TO

d)

PRIMARY KEY

78.

Complete the code

to create the table Departments (dep id

(PK), name, faculty_id), where

faculty_id is a FK to the table Faculties: CREATE TABLE Departments(dep id int PRIMARY KEY, name

varchar(10), faculty_id int___(faculty_id)REFERENCES Faculties(faculty_id));

a)

FOREIGN KEY

b)

REFERENCES

c)

FOREIGN

d)

PRIMARY KEY

79.

Complete the code to create the table Departments (deptid (PK), dep_name), where dep_name

attribute has the not null constraint: CREATE TABLE Departments( deptid int PRIMARY KEY, dept name

varchar(10)___);

a)

NOT NULL

b)

UNIQUE

c)

IS NULL

d)

PRIMARY KEY

80.

Complete the code to create the table Departments (deptid (PK), dep name), where dept name

attribute has the unique constraint: CREATE TABLE Departments(dep id int PRIMARY KEY, dep name

varchar(10)___);

a)

UNIQUE

b)

NOT NULL

c)

IS UNIQUE

d)

PRIMARY KEY

81.

Complete the code to create the table Subjects (subj_id (PK), name):___(subjid

int PRIMARY KEY, name yarchar(10));

a)

CREATE TABLE

b)

ALTER TABLE

c)

CREATE DATABASE

d)

TABLE

82.

Complete the code to drop the table Coumes___Cersa

a)

DROP TABLE

b)

DROP COLUMN

c)

DELETE TARLE

d)

REMOVE TABLE

83.

The SQL DROP TABLE clause is wied to___

a)

delete a table from the database

b)

delete a column from the database

c)

delete a relationship from the database

d)

delete a row from the table

84.

The statement in SQL which allows to change the structure of a table is

…

a)

ALTER TABLE

b)

UPDATE

c)

CREATE TABLE

d)

CHANGE TABLE

85.

<question> What does SQL stand for?

a)

Structured Query Language

b)

Strict Query Language

c)

Standard Query Language

d)

Strong Query Language

86.

Which of the following language is used to

specify database structure?

a)

Data Definition Language

b)

Data Development Language

c)

Data Manipulation Language

d)

Data Management Language

87.

With SQL, how do you select all the records from a table named "Persons" where the value of

the column "FirstName" is "Peter"?

a)

SELECT * FROM Persons WHERE FirstName<>'Peter'

b)

SELECT [all] FROM Persons WHERE FirstName='Peter'

c)

SELECT * FROM Persons WHERE FirstName='Peter

d)

SELECT [all] FROM Persons WHERE FirstName LIKE 'Peter

88.

With SQL, how do you select all the records from a table named "Persons" where the

"FirstName" is "Peter" and the "LastName" is "Jackson"?

a)

SELECT FirstName='Peter', LastName='Jackson' FROM Persons;

b)

SELECT * FROM Persons WHERE

FirstName<>'Peter' AND LastName<>'Jackson';

c)

SELECT * FROM Persons WHERE FirstName 'Peter' AND LastName='Jackson';

d)

SELECT * FROM Persons WHERE LastName='Jackson';

89.

Which of the following is the correct order of keywords for SQL SELECT statements?

a)

SELECT, FROM, WHERE

b)

FROM, WHERE, SELECT

c)

WHERE, FROM,SELECT

d)

SELECT,WHERE,FROM

90.

If you want to apply a second

condition to your statement where both statements must be true,

what keyword would you use between the conditions?

a)

AND

b)

BOTH

c)

TRUE

d)

WHERE

91.

Union R1 U R2 is …

a)

is the relation containing all tuples of R1 that do not appear in R2

b)

is the relation containing all tuples that appear only in both R1 and R2

c)

is the relation containing all tuples that appear in R1, R2, or both

d)

None of the given

92.

EXCEPT in SQL is analogous to

a)

Intersection operator of relational algebra

b)

Cartesian product operator of relational algebra

c)

Difference operator of relational algebra

d)

Join operator of relational algebra

93.

Complete the code:

Students VALUES (1,'FirstNamel','LastNamel','2000-01-01',I);

a)

INSERT INTO

b)

UPDATE

c)

CREATE TABLE

d)

DELETE FROM

94.

Complete the code: DELETE FROM Students___stud_id=2;

a)

WHERE

b)

WHEN

c)

WITH

d)

AND

95.

Complete the code for the following table Departments (depart_id (PK), name): UPDATE

Departments___name='IT' WHERE depart_id=1;

a)

SET

b)

WHERE

96.

Set difference R1 - R2 is …

a)

is the relation containing all tuples that appear in R1, R2, or both

b)

is the relation containing all tuples that appear only in both R1 and R2

c)

is the relation containing all tuples of R1 that do not appear in R2

d)

None of the given

97.

Intersection R1 N R2 is …

a)

is the relation containing all tuples that appear in R1, R2, or both

b)

is the relation containing all tuples of R1 that do not appear in R2

c)

is the relation containing all tuples that appear only in both R1 and R2

d)

None of the given

98.

The FULL OUTER JOIN keyword combines the results of both … and … joins.

a)

LEFT, INNER

b)

INNER, RIGHT

c)

LEFT, RIGHT

d)

INNER CROSS

99.

LIKE 'SIS-_' can give 'SIZE-2301' as the answer

a)

True

b)

False

100.

How to select all data from student table starting the name from letter 'r"?

a)

SELECT * FROM student WHERE name LIKE 'r%';

b)

SELECT * FROM student WHERE name LIKE "%r%';

c)

SELECT * FROM student WHERE name LIKE "%r';

d)

SELECT * FROM student WHERE name LIKE '_r%';

101.

Aggregate function … selects the minimum value.

a)

min()

b)

minimum()

c)

least()

d)

small()

102.

The … clause sets the selection condition for aggregate functions or group rows created by the

GROUP BY clause.

a)

HAVING

b)

GROUP BY

c)

WHERE

d)

ORDER BY

103.

Aggregate function … selects the number of occurrences (the number of tuples that satisfy a

selection condition).

a)

count()

b)

number()

c)

sum()

104.

The … operator (which must follow a comparison operator) compares the value of attribute to

every value returned by the subquery. The result is true if all rows yield true. The result is false if any

false result is found.

a)

ALL

b)

ANY

c)

EXISTS

d)

EVERY

105.

Write the possible operator when a result of a subquery is multiple values (multiple fields).

a)

IN

b)

«=»

c)

«<>»

d)

none of the given

106.

Select the condition when the «=» operator can be used with a subquery.

a)

The result of the subquery is one value (one field)

b)

the subquery contains the GROUP BY keyword

c)

The result of the subquery is multiple values (multiple fields)

d)

none of the given

107.

Find all the tuples having temperature greater than 'Paris'.

a)

SELECT FROM weather WHERE temperature > (SELECT FROM weather WHERE city =

'Paris')

b)

SELECT * FROM weather WHERE temperature > (SELECT city FROM weather WHERE city

= 'Paris')

c)

SELECT * FROM weather WHERE temperature > 'Paris' temperature

d)

<variant>SELECT * FROM weather WHERE temperature > (SELECT temperature FROM weather

WHERE city = 'Paris')

108.

What keyword is used to create a CTE?

a)

WITH

b)

BY

c)

USING

d)

CTE

109.

Which of the following multi-row operators can be used with a subquery?

a)

ALL only

b)

ANY only

c)

IN only

d)

All of the given

110.

Which of the following is used to denote the projection operation in relational algebra?

a)

Pi (Greek)

b)

Sigma (Greek)

c)

Lambda (Greek)

d)

Omega (Greek)

111.

Which of the following is not a relational algebra operation?

a)

Selection

b)

Projection

c)

Manipulate

d)

Union

112.

What statement is used to create a view?

a)

CREATE VIEW

b)

ADD VIEW

c)

NEW VIEW

d)

CREATE TABLE

113.

EXCEPT in SQL is analogous to

a)

Intersection operator of relational algebra

b)

Cartesian product operator of relational algebra

c)

Difference operator of relational algebra

d)

Join operator of relational algebra

114.

What operator tests column for the absence of data?

a)

IS NULL operator

b)

EXISTS operator

115.

Union R1 R2 is …

a)

is the relation containing all tuples of R1 that do not appear in R2

b)

is the relation containing all tuples that appear only in both R1 and

R2

c)

is the relation containing all tuples that appear in R1, R2, or both

d)

None of the given

116.

Set difference R1 - R2

is

…

a)

is the relation containing all tuples that appear in R1, R2, or both

b)

is the relation containing all tuples that appear only in both R1 and R2

c)

is the relation containing all tuples of R1 that do not appear in R2

d)

None of the given

117.

With SQL, how can you return the numbers

a)

SELECT COUNT(*) FROM Persons;

b)

SELECT COLUMNS(*) FROM Persons;

118.

Which SQL statement will selects all rows from a table called "Customers" and orders the

result by "customer name"?

a)

SELECT * FROM Customers ORDER BY customer_name;

b)

SELECT * FROM Customers ORDER ON customer_name;

119.

Which of the following are the five built-in aggregate functions provided by SQL?

a)

COUNT, SUM, AVG, MAX, MIN

b)

TOTAL, AVERAGE, HIGHEST, LOWEST, and RANGESUM, AVG, MIN, MAX, MULTI

120.

A subquery in an SQL SELECT statement is enclosed in

a)

braces - {…}

b)

CAPITAL LETTERS

c)

parenthesis - (…)

d)

brackets - […]

121.

SQL allows testing the emptiness of a subquery's result using the … keyword.

a)

EXISTS

b)

ANY

c)

ALL

d)

IS NULL

122.

WmI SQL, how df

do yo

the column "FirstName" starts wit

rts with an "a"

a)

SELECT * FROM Persons WHERE FirstName LIKE 'a%';

b)

SELECT FROM Persons WHERE FirsiName LIKE %a':

123.

LIKE operator uses

and

a)

percent sign (%); underscore(_)

b)

underscore(); question mark (?)

124.

Choose the correct order of keywords in a SELECT statement

a)

GROUP BY, HAVING, ORDER BY

b)

HAVING, ORDER BY, GROUP BY

125.

The … operator compares the value of attribute to each value returned by the subquery. This

keyword (which must follow a comparison operator) returns TRUE if the comparison is TRUE for any of

the values in the column that the subquery returns.

a)

ANY

b)

ALL

c)

EXISTS

d)

AT LEAST

126.

Choose the correct option to convert phone number attribute from varchar to integer data type

a)

phone number::varchar(3)

b)

phone number:into

c)

phone_number::yarchar(*)

d)

phone_number to int

127.

What is a result of "CAST (phone_number AS INTEGER)"?

a)

phone_number attribute will be converted into integer data type

b)

phone_number attribute will be converted from integer into yarchar data type

c)

phone number attribute will be converted to lower case

d)

phone number

attribute

will

be converted to upper case

128.

LIKE 'SIS-%' can give 'SIZE-2301' as the answer

a)

True

b)

False

129.

… operator is used to convert from one data type into another.

a)

CAST

b)

IS NULL

c)

DISTINCT

d)

LIKE

130.

SQL provides the … operator for pattern matching.

a)

LIKE

b)

IS NULL

c)

CAST

d)

DISTINCT

131.

Which SQL keyword is used to return only different (unique) values?

a)

DISTINCT

b)

UNIQUE

c)

DIFFERENT

d)

*

132.

To check if a value in a column is not null, the … operator is used.

a)

IS NOT NULL

b)

DISTINCT

c)

BETWEEN

d)

LIKE

133.

Column names can be aliased to another using the … operator.

a)

AS

b)

LIKE

c)

CAST

134.

What is the meaning of LIFE %4040%

a)

Answer has two O's in it, at any position

b)

Answer has more than two O's