A question bank for every class and subject

Practice questions, with answers and explanations included

794 questions available

Refine

All questions

794 results
781

Write the SQL command to add a new column 'Age' of type INTEGER to the table 'Teacher'.

SHORT Easy
Information Technology (802) · Class 12 · Sep 26, 2026
Show answer
Explanation: ALTER TABLE Teacher ADD Age INTEGER;
782

Evaluate the Java relational expression: 15 > 9

MCQ Easy
a. TRUE
b. FALSE
Information Technology (802) · Class 12 · Sep 26, 2026
Show answer
TRUE
Explanation: The expression 15 > 9 evaluates to true.
783

Convert: 3 GB = ______ MB.

SHORT Easy
Information Technology (802) · Class 11 · Sep 26, 2026
Show answer
Explanation: 3 GB = 3 x 1024 MB = 3072 MB.
784

Write the SQL command to drop the column 'Age' from the table 'Teacher'.

SHORT Easy
Information Technology (802) · Class 12 · Sep 26, 2026
Show answer
Explanation: ALTER TABLE Teacher DROP Age;
785

Evaluate the Java relational expression: 22 == 22

MCQ Easy
a. TRUE
b. FALSE
Information Technology (802) · Class 12 · Sep 26, 2026
Show answer
TRUE
Explanation: The expression 22 == 22 evaluates to true.
786

Convert: 4 GB = ______ MB.

SHORT Easy
Information Technology (802) · Class 11 · Sep 26, 2026
Show answer
Explanation: 4 GB = 4 x 1024 MB = 4096 MB.
787

Write the SQL command to drop the named foreign key constraint 'TEACHER_FK' from the table 'Teacher'.

SHORT Medium
Information Technology (802) · Class 12 · Sep 26, 2026
Show answer
Explanation: ALTER TABLE Teacher DROP FOREIGN KEY TEACHER_FK;
788

Evaluate the Java relational expression: 7 != 7

MCQ Easy
a. TRUE
b. FALSE
Information Technology (802) · Class 12 · Sep 26, 2026
Show answer
FALSE
Explanation: The expression 7 != 7 evaluates to false.
789

Convert: 5 GB = ______ MB.

SHORT Easy
Information Technology (802) · Class 11 · Sep 26, 2026
Show answer
Explanation: 5 GB = 5 x 1024 MB = 5120 MB.
790

Write the CREATE TABLE command for a Teacher table with columns: Teacher_ID (INTEGER, Primary Key), First_Name (VARCHAR(20), NOT NULL), Last_Name (VARCHAR(20)), Gender (CHAR(1)), Salary (DECIMAL(10,2), default 40000), Date_of_Birth (DATE), and Dept_No (INTEGER, Foreign Key referencing Dept_ID of Department).

LONG Hard
Information Technology (802) · Class 12 · Sep 26, 2026
Show answer
Explanation: CREATE TABLE Teacher (Teacher_ID INTEGER PRIMARY KEY, First_Name VARCHAR(20) NOT NULL, Last_Name VARCHAR(20), Gender CHAR(1), Salary DECIMAL(10,2) DEFAULT 40000, Date_of_Birth DATE, Dept_No INTEGER, FOREIGN KEY (Dept_No) REFERENCES Department(Dept_ID));
791

Evaluate the Java relational expression: 4 >= 12

MCQ Easy
a. TRUE
b. FALSE
Information Technology (802) · Class 12 · Sep 26, 2026
Show answer
FALSE
Explanation: The expression 4 >= 12 evaluates to false.
792

Convert: 6 GB = ______ MB.

SHORT Medium
Information Technology (802) · Class 11 · Sep 26, 2026
Show answer
Explanation: 6 GB = 6 x 1024 MB = 6144 MB.
793

Explain, with the CREATE TABLE syntax, the difference between ON DELETE SET NULL, ON DELETE CASCADE, and ON DELETE RESTRICT for a foreign key.

LONG Hard
Information Technology (802) · Class 12 · Sep 26, 2026
Show answer
Explanation: ON DELETE SET NULL: if the referenced row in the parent table is deleted, the foreign key value(s) in the child table referring to it are set to NULL. ON DELETE CASCADE: if the referenced row is deleted, all corresponding rows in the child table are also automatically deleted. ON DELETE RESTRICT: the delete operation on the parent table is rejected if there are any related rows in the child table — you cannot delete a referenced row while dependent rows exist.
794

Evaluate the Java relational expression: 6 <= 6

MCQ Easy
a. TRUE
b. FALSE
Information Technology (802) · Class 12 · Sep 26, 2026
Show answer
TRUE
Explanation: The expression 6 <= 6 evaluates to true.