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