Q151
Q151 What type of database model organizes data in tables with rows and columns?
Hierarchical
Network
Relational
Object-Oriented
Q152
Q152 In a database, what is a unique identifier for each record in a table called?
Primary key
Secondary key
Foreign key
Index key
Q153
Q153 Which SQL statement is used to retrieve data from a database?
UPDATE
DELETE
INSERT
SELECT
Q154
Q154 What is the purpose of normalization in a database?
Increase data redundancy
Optimize query speed
Reduce data redundancy
Improve data security
Q155
Q155 Which of the following is not a characteristic of a good database design?
Data integrity
Data redundancy
Scalability
Efficiency
Q156
Q156 Which data type is used in SQL to store true or false values?
INT
BOOLEAN
VARCHAR
FLOAT
Q157
Q157 In SQL, which data type is best suited for storing large texts such as articles or comments?
TEXT
VARCHAR
CHAR
BLOB
Q158
Q158 Which SQL data type is used to store numerical values with fixed precision and scale?
DECIMAL
INTEGER
DATE
VARCHAR
Q159
Q159 In SQL, what is the difference between CHAR and VARCHAR data types?
CHAR is fixed length, VARCHAR is variable length
CHAR is variable length, VARCHAR is fixed length
No difference
VARCHAR is used only for numeric data
Q160
Q160 What data type would you use in SQL to store a date and time value together?
DATETIME
DATE
TIME
TIMESTAMP
Q161
Q161 Which SQL command is used to create a new table in a database?
CREATE
ALTER
DROP
TRUNCATE
Q162
Q162 What does the DROP command do in SQL?
Adds a new row to a table
Deletes an existing table
Modifies a table
Creates a new table
Q163
Q163 In SQL, what is the purpose of the TRUNCATE command?
Deletes specific rows from a table
Removes all rows from a table
Changes table structure
Creates a new table
Q164
Q164 Which command should be used to change the datatype of a column in an SQL table?
CREATE
ALTER
DROP
TRUNCATE
Q165
Q165 What is the difference between the DROP and TRUNCATE commands in SQL?
DROP deletes the table, TRUNCATE deletes only the table data
TRUNCATE deletes the table, DROP deletes only the table data
No difference
Both commands modify table data
Q166
Q166 Which part of this statement is incorrect?
"CREATE TABEL Students (ID int, Name varchar(50));"
TABEL
Students
ID int
Name varchar(50)
Q167
Q167 Identify the error in
"ALTER TABLE Students DROP COLUMN DateOfBirth date;"
ALTER TABLE
DROP COLUMN
DateOfBirth
date
Q168
Q168 What needs to be changed in 'TRUNCATE TABLE Students;' to make it a valid SQL statement?
Change 'TRUNCATE' to 'DELETE'
Remove 'TABLE'
Change 'Students' to 'Student'
No error
Q169
Q169 Correct the syntax error in
"CREATE TABLE Students (ID int PRIMARY, Name varchar(50));"
PRIMARY
ID int
Name varchar(50)
CREATE TABLE
Q170
Q170 Identify the error in "ALTER TABLE Students ADD COLUMN Email varchar(50);"
Add 'COLUMN' after 'ADD'
Change 'varchar(50)' to 'varchar2(50)'
Change 'Email' to 'EmailID'
No error
Q171
Q171 Which SQL command is used to add a new record to a table?
SELECT
DELETE
UPDATE
INSERT
Q172
Q172 What does the UPDATE command in SQL do?
Deletes a record
Modifies an existing record
Adds a new record
Retrieves data
Q173
Q173 In SQL, what is the purpose of the WHERE clause in a DELETE statement?
Specifies which database to use
Specifies which table to delete from
Specifies which records to delete
Specifies how to order the records
Q174
Q174 Which command is used to remove a specific record from a table in SQL?
DELETE
UPDATE
INSERT
SELECT
Q175
Q175 How does a transaction ensure data integrity in SQL?
By locking the database
By allowing multiple users to modify data simultaneously
By ensuring all operations within the transaction are completed before committing
By automatically updating all related tables
Q176
Q176 What needs to be corrected in the query "SELECT Name FROM Employees WHERE Age > 30 AND Department = 'HR';"?
Replace 'AND' with 'OR'
Change 'Age > 30' to 'Age < 30'
Change 'Department = 'HR'' to 'Department == 'HR''
No error
Q177
Q177 Identify the error in
"UPDATE Employees SET Salary = Salary * 1.05 WHERE;"
UPDATE keyword
SET keyword
WHERE clause
No error
Q178
Q178 What is missing in "INSERT INTO Employees (Name, Department) VALUES ('John', 'Sales');"
Add a closing parenthesis after 'Sales'
Remove the opening parenthesis before 'Name'
Include 'ID' column in the INSERT statement
No error
Q179
Q179 Correct the syntax error in
"DELETE FROM Employees HAVING Age < 25;"
DELETE keyword
FROM keyword
HAVING keyword
No syntax error
Q180
Q180 Identify the error in "UPDATE Employees SET Age = Age + 1 WHERE Department IN ('Sales', 'HR') AND Age >= 30;"
Change 'Age = Age + 1' to 'Age = Age - 1'
Replace 'IN' with 'NOT IN'
Remove 'AND Age >= 30'
No error