Font size
WorksheetsDatabase Quiz 4 SQL
Total questions: 21
Worksheet time: 20mins
SQL is a declarative programming language
True
False
The syntax for INSERT INTO statement is:
INSERT INTO table_name (column1, column2, …) (a) (value1, value2, …)
Which statement involve syntax of SET?
(a)
The syntax for a SELECT query in SQL is:
SELECT table_names FROM field_name WHERE condition ORDER BY field_name
SELECT field_names FROM table_name WHERE condition ORDER BY table_name
SELECT table_names FROM field_name WHERE condition ORDER BY table_name
SELECT field_names FROM table_name WHERE condition ORDER BY field_name
The query to print the complete table Student is: SELECT * FROM Student
True
False
The syntax for deleting a field using an ALTER TABLE statement is:
ALTER TABLE table_name
(a) field_name
The ORDER BY clause by default orders in (a) order.
Operator for Not equal to is:
(a)
The syntax for modifying the data type of a field using an ALTER TABLE statement is:
ALTER TABLE table_name
(a)
A (a) symbol is used for field_names if all columns are to be displayed.
Wildcard characters substitute other characters in a string. These characters are used with a (a) operator.
How to write condition to select people who was born in 2023:
SELECT * FROM Student
WHERE DateOfBirth (a)
(a) represents zero or more characters
(a) represents a single character
Which of the following query can have the result shown in the picture?
SELECT * FROM Student WHERE DateOfBirth>=01/01/1999 ORDER BY Major, StudentName DESC
SELECT * FROM Student WHERE DateOfBirth>=#01/01/1999# ORDER BY Major, StudentName
SELECT * FROM Student WHERE DateOfBirth>=#01/01/1999# ORDER BY Major, StudentName DESC
SELECT * FROM Student WHERE DateOfBirth>=#01/01/1999# ORDER BY Major DESC, StudentName
DELETE statement is used to remove data from a table. The syntax for using this statement is:
(a) table_name WHERE condition
DELETE statement is used to remove data from a table. The syntax for using this statement is:
(a) table_name WHERE condition
Which statement is used to combine two or more tables and the tables are combined based on a field that is common for both tables.
(a)
To add new records, (a) statement is used.
The numbers in the brackets of CHAR represent (a) of digits a data type can hold.
The SQL query to create the table ‘CourseGrade’ is:
CREATE TABLE CourseGrade (
FOREIGN KEY CourseID ________ Course (CourseID),
FOREIGN KEY StudentID ________ Student (StudentID),
Grades CHAR(1))
(a)
