Question 1
Which SQL statement is used to retrieve unique values from a column?
1
SELECT DIFFERENT column_name FROM table_name;
2
SELECT UNIQUE column_name FROM table_name;
3
SELECT column_name FROM table_name WHERE DISTINCT;
4
SELECT DISTINCT column_name FROM table_name;
Question 2
What does SQL stand for?
1
System Query Language
2
Structured Query Language
3
Standardized Query Logic
4
Sequential Query Language
Question 3
Which SQL command is used to remove all records from a table without deleting the table structure?
1
CLEAR
2
TRUNCATE
3
DELETE
4
DROP
Question 4
Which SQL join returns only the matching rows from both tables?
1
INNER JOIN
2
FULL JOIN
3
LEFT JOIN
4
RIGHT JOIN
Question 5
Which SQL constraint ensures that a column cannot have NULL values?
1
UNIQUE
2
NOT NULL
3
PRIMARY KEY
4
CHECK
Question 6
Which of the following is NOT an SQL aggregate function?
1
COUNT()
2
CONCAT()
3
AVG()
4
SUM()
Question 7
Which SQL clause is used to filter records from a table?
1
HAVING
2
GROUP BY
3
ORDER BY
4
WHERE
Question 8
Which SQL JOIN returns all records from the left table and only matching records from the right table?
1
LEFT JOIN
2
FULL JOIN
3
RIGHT JOIN
4
INNER JOIN
Question 9
Which constraint is used to ensure that all values in a column are unique?
1
UNIQUE
2
CHECK
3
NOT NULL
4
FOREIGN KEY
Question 10
Which SQL clause is used with aggregate functions to group results?
1
HAVING
2
GROUP BY
3
ORDER BY
4
DISTINCT
Question 11
Which database index type speeds up text searches in SQL?
1
B-Tree Index
2
Full-Text Index
3
Clustered Index
4
Hash Index
Question 12
Which SQL command is used to permanently save changes in a transaction?
1
ROLLBACK
2
SAVEPOINT
3
DELETE
4
COMMIT
Question 13
Which normal form removes partial dependency?
1
1NF
2
2NF
3
BCNF
4
3NF
Question 14
Which SQL command creates a virtual table?
1
CREATE INDEX
2
CREATE PROCEDURE
3
CREATE TABLE
4
CREATE VIEW
Question 15
Which keyword is used to define an output parameter in an SQL stored procedure?
1
OUT
2
OUTPUT
3
RETURN
4
RESULT
Question 16
Which of the following SQL commands is used to remove all records from a table but keep its structure?
1
DROP
2
ALTER
3
TRUNCATE
4
DELETE
Question 17
Which index type does MySQL use by default for primary keys?
1
Hash Index
2
B-Tree Index
3
Bitmap Index
4
Full-Text Index
Question 18
Which of the following statements about NoSQL and SQL databases is TRUE?
1
SQL databases cannot store unstructured data.
2
NoSQL is better for large-scale, distributed applications.
3
NoSQL databases always provide better performance than SQL databases.
4
NoSQL databases use relational tables to store data.
Question 19
Which of the following is a key difference between SQL and NoSQL databases?
1
SQL databases do not support transactions, while NoSQL does
2
SQL databases are schema-less, NoSQL databases require a strict schema
3
SQL databases store data in documents, NoSQL stores data in tables
4
SQL databases use structured query language, NoSQL uses flexible data models
Question 20
Which ACID property ensures that once a transaction is committed, it remains so even in case of system failure?
1
Consistency
2
Durability
3
Atomicity
4
Isolation
Question 21
Which of the following best describes an RDBMS?
1
A file-based system for data storage
2
A database system that stores data in key-value pairs
3
A database system that organizes data in tables with relationships
4
A database system that only allows unstructured data storage
Question 22
In a relational database, what does a foreign key do?
1
Establishes a relationship between two tables
2
Uniquely identifies a row in a table
3
Automatically indexes data
4
Ensures a table has at least one row
Question 23
Which of the following is an example of an RDBMS?
1
MySQL
2
MongoDB
3
Firebase
4
Neo4j