0% found this document useful (0 votes)
12 views

Database

Reviewer about database topic

Uploaded by

maybelldiclas
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views

Database

Reviewer about database topic

Uploaded by

maybelldiclas
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

Which SQL syntax is used to check if a value is NULL?

C. SELECT * FROM table_name WHERE column_name IS NULL

What is the correct syntax to count the number of rows in a table?

SELECT COUNT(*) FROM table_name

What is the correct syntax to add a NOT NULL constraint to an existing column?

B. ALTER TABLE table_name MODIFY column_name datatype NOT NULL

SQL, the keyword used to retrieve unique values from the result set is

C. DISTINCT

Which of the following operations will generate the Cartesian product of two tables?

A. Cross Join

What is the key difference between static and dynamic SQL?

B. Dynamic SQL is generated at runtime

Which operator is used to compare a single value to a list of values using inequality comparison?

B. ANY

Which type of subquery is executed once and its result used by the outer query?

C. Simple Subquery

Which join returns rows where there is a match on both tables?

C. Inner Join

The SQL function used to concatenate strings is _

A. CONCAT

Which SQL clause restricts the result of a GROUP BY query?

B. HAVING

Which relational set operator returns only rows appearing in both queries?

B. INTERSECT

Which clause is used to process groups of rows that share the same values?

C. GROUP BY

What does a subquery in the WHERE clause typically return?

A single value

Wich operator combines rows from two queries, returning all duplicates?

C. UNION ALL

Which SQL clause is used to filter results based on specific conditions?

B. WHERE

What is the correct syntax for selecting specific columns from a table?

A. SELECT columns FROM table_name

In a right outer join, which table's rows are returned if unmatched?

B. The right table

Which SQL operator checks whether a value matches any value in a list?

A. IN

Which is the correct syntax for using the BETWEEN operator in SQL?

B. SELECT * FROM table_name WHERE column_name BETWEEN value1 AND value2!

How do you remove a table from a database?

C. DROP TABLE table_name;


The special character that can be used to select all attributes in a SELECT statement:

B. *

What is the purpose of the ROLLBACK command in SQL?

C. To undo changes

Which command would be used to change the structure of a table by adding a column?

C. ALTER

II. Alternate Response. A true B false

A. 31. A full outer join returns unmatched rows from both tables.

B. 32.Dynamic SQL is known in advance

B. 33.The TO_DATE function is used to convert a character string.

B. 34.UNION cannot be used to combine two sets of queries.

A. 35. UNION operator returns distinct rows from both sets of queries.

B. 36.The NOT NULL constraint ensures a column is unable to accept null values.

B. 37.A table can more than have one primary key.

A. 38.The LIKE operator is used to match patterns in SQL.

B. 39.The ORDER BY clause is used to filter records in a SELECT statement.

A. 40.The DISTINCT keyword removes duplicate rows from a SELECT result.

III. Identification.

subquery 41. A query inside another query is known as a ____.

left outer join 42. What do you call a join that returns rows matching the join

condition but also rows from the left table with uninitialized values?

trigger 43.What is the term for procedural SQL code that is automatically invoked by

an RDBMS on a data manipulation event?

stored procedure 44.A ____ is a named collection of procedural and SQL statements is known as ____.

alter 45.SQL command that adds or modifies table rows.

select 46.SQL command that lists the contents of a table.

between 47. Operator used to check if a value exists in a specified range.

commit 48. SQL command that permanently saves changes made to a table.

relation 49.A table with at least two attributes is also called a ____.

union 50. The SQL command used to combine rows from two queries without duplicates.

You might also like