Test Your Knowledge
1.Which of the following actions cannot be performed using SQL?
a) Inserting records into a database
b) Retrieving data from a database
c) Deleting records from a database
d) Updating multiple tables in a database
2.Which of the following terms refers to a row in a database table?
a) Field, Record
b) Attribute, Field
c) Tuple, Attribute
d) Tuple, Record
3. Which of the following terms refers to a column in a database table?
a) Attribute, Field
b) Field, Record
c) Tuple, Record
4.RDBMS stands for:
a) Relative Database Management System
b) Related Database Management System
c) Relational Database Management System
d) Relative Database Management System
d) Tuple, Attribute
5.In an RDBMS, data is stored in:
a) Database Object
b) SQL Object
c) SQL Server
d) Database Server
6.What is the foundation of SQL?
a) DBMS
b) RDBMS
c) SQL Server
d) Oracle
7. Where is specific information about each record in a table stored?
a) Field
b) Record
c) Row
d) Database Object
8.Which of the following statements about tables is not true?
a) It is a database object
b) It is a collection of irrelevant data entries
c) It consists of fields known as columns
d) It consists of records known as rows
9.What best defines a record?
a) A record is a vertical entity
b) A record is each individual entry in a table
c) A record is an entity that contains all information related to the fields of a table
d) A record is a column
10.Which operator is used to compare two values in SQL?
a) +
b) =
c) <>
d) &
11. What is the purpose of the SQL keyword “DISTINCT” in a SELECT statement?
a) To retrieve unique values from a column
b) To filter NULL values
c) To delete duplicate records
d) To sort the result set
12.Which statement(s) are required in a basic SQL SELECT statement?
a) Select, From
b) Select, OrderBy
c) Select, Where
d) Select, GroupBy
13.Which of the following is the default join type?
a) Right join
b) Left join
c) Inner join
d) Outer join
14.Which of the following SQL statements retrieves only unique values from the ‘section’ column of the ‘university’ table?
a) SELECT section FROM university;
b) SELECT DISTINCT section FROM university;
c) SELECT * FROM university;
d) SELECT ALL section FROM university;
15.The SQL LIKE operator is used in which of the following clauses?
a) Having
b) Select
c) Where
d) Group by
16.SQL keywords are case-sensitive.
a) True
b) False
17.Which of the following SQL command(s) are used to fetch information from a database?
a) Update
b) Extract
c) Select
d) Retrieve
18.Which command is used to delete existing data from a database without removing the table?
a) Drop
b) Delete
c) Remove
d) Collapse
19.Which SQL command is used to modify data in a database?
a) Modify
b) Change
c) Save
d) Update
20.Which SQL command is used to insert new data into a database?
a) Insert
b) Insert Into
c) Update
d) Add New
21.The AND operator displays a record if ___
a) Any of the conditions separated by AND is true
b) All the conditions separated by AND are true
c) Any of the conditions separated by AND is not true
d) All the conditions separated by AND are not true
22.The OR operator displays a record if ____
a) Any of the conditions separated by OR is true
b) All the conditions separated by OR are true
c) Any of the conditions separated by OR is not true
d) All the conditions separated by OR are not true
23.What is the correct syntax for the AND operator?
a) Select * from table_name where condition1 && condition2;
b) Select * from table_name where condition1 & condition2;
c) Select * from table_name where condition1 AND condition2;
d) Select * from table_name where condition1 AND & condition2;
24.Which of the following is used to retrieve only the records that meet a specified condition?
a) Select
b) Where
c) From
d) Having
25.Which of the following requires single quotes in SQL?
a) Numeric fields
b) Clauses
c) Text fields
d) Columns
26.Which of the following is not a valid operator and cannot be used in the WHERE clause?
a) =
b) ==
c) <=
d) >=
27.Which of the following terms is used to retrieve the smallest value of the selected field?
a) Small( )
b) Smallest( )
c) Min( )
d) Minimum( )
28.Which function is used to find the record with the maximum value in a set of records?
a) Maximum( )
b) Max( )
c) Large( )
d) Largest( )
29.When a date field is used in the min( ) function, it returns ?
a) The earliest date
b) The date with the latest day, regardless of the month and year
c) The latest date
d) The date with the earliest day, regardless of the month and year
30.When a date field is used with the max( ) function, it returns __
a) The earliest date
b) The date with the latest month, regardless of the day and year
c) The latest date
d) The date with the earliest month, regardless of the day and year