solution - SQL : SQL Table (Test 1)

Question : What is a table in SQL?
A table is a collection of related data organized in rows and columns.

Solution :
319220260520081106 Correct Answer : Collection of rows and columns

Description -

SQL : SQL Table (Test 1)

Question : Which SQL command is used to create a table?

Solution :
780920260520081004 Correct Answer : CREATE TABLE

Description -

SQL : SQL Table (Test 1)

Question : Which command removes all records but keeps the table structure?

Solution :
531620260520080918 Correct Answer : TRUNCATE

Description -

SQL : SQL Table (Test 1)

Question : Which command removes both data and table structure?

Solution :
436520260520080837 Correct Answer : DROP TABLE

Description -

SQL : SQL Table (Test 1)

Question : Which command is used to rename a table?

Solution :
32820260520080611 Correct Answer : RENAME TABLE

Description -

SQL : SQL Table (Test 1)

Question : Which command deletes selected rows from a table?

Solution :
416920260520080533 Correct Answer : DELETE

Description -

SQL : SQL Table (Test 1)

Question : Which statement deletes all rows using DELETE?
DELETE FROM Student;

Solution :
364620260520080453 Correct Answer : Deletes all rows

Description -

SQL : SQL Table (Test 1)

Question : Which command is faster for removing all records?

Solution :
601420260520080353 Correct Answer : TRUNCATE

Description -

SQL : SQL Table (Test 1)

Question : Which SQL command copies data from one table to another?

Solution :
69620260520080324 Correct Answer : INSERT INTO SELECT

Description -

SQL : SQL Table (Test 1)

Question : Which table exists temporarily during a session?

Solution :
14620260520080234 Correct Answer : Temp Table

Description -

SQL : SQL Table (Test 1)

Question : Which keyword creates a temporary table?

Solution :
166720260520080138 Correct Answer : Both TEMP & TEMPORARY

Description -

SQL : SQL Table (Test 1)

Question : Which command modifies table structure?

Solution :
873020260520080034 Correct Answer : ALTER TABLE

Description -

SQL : SQL Table (Test 1)

Question : Which command adds a new column?
ALTER TABLE Student ADD age INT;

Solution :
469920260520075959 Correct Answer : Adds column

Description -

SQL : SQL Table (Test 1)

Question : Which command removes a column?

Solution :
196720260520075912 Correct Answer : DROP COLUMN

Description -

SQL : SQL Table (Test 1)

Question : Which command changes column datatype?

Solution :
367320260520075825 Correct Answer : ALTER TABLE MODIFY

Description -

SQL : SQL Table (Test 1)

Question : Which statement is used to rename a column in MySQL?

Solution :
682820260520075741 Correct Answer : CHANGE COLUMN

Description -

SQL : SQL Table (Test 1)

Question : Which operation cannot be rolled back in many DBMS?

Solution :
372720260520075714 Correct Answer : TRUNCATE

Description -

SQL : SQL Table (Test 1)

Question : Which command removes duplicate structure and data permanently?

Solution :
935020260520075632 Correct Answer : DROP TABLE

Description -

SQL : SQL Table (Test 1)

Question : What will this command do?

CREATE TABLE Emp AS
SELECT * FROM Employee;

Solution :
868420260520075538 Correct Answer : Copy structure and data

Description -

SQL : SQL Table (Test 1)

Question : Which SQL command changes table name from Student to Learner?

Solution :
703520260520075429 Correct Answer : RENAME TABLE Student TO Learner;

Description -

SQL : SQL Table (Test 1)

Question : Which command preserves auto increment reset?

Solution :
359520260520075356 Correct Answer : TRUNCATE

Description -

SQL : SQL Table (Test 1)

Question : Which command is DDL?

Solution :
21420260520075320 Correct Answer : CREATE TABLE

Description -

SQL : SQL Table (Test 1)

Question : Which command belongs to DML?

Solution :
711420260520075214 Correct Answer : DELETE

Description -

SQL : SQL Table (Test 1)

Question : What is the default storage object in SQL?

Solution :
419820260520075138 Correct Answer : Table

Description -

SQL : SQL Table (Test 1)

Question : Which statement creates a temp table?

CREATE TEMP TABLE Test(
id INT
);

Solution :
233620260520075025 Correct Answer : Temporary table

Description -

SQL : SQL Table (Test 1)

Question : Which command copies only structure without data?

Solution :
167620260520074830 Correct Answer :

CREATE TABLE NewTable AS
SELECT * FROM OldTable WHERE 1=0;

Description -

SQL : SQL Table (Test 1)

Question : Which command can add constraints to existing table?

Solution :
876920260520074518 Correct Answer : ALTER TABLE

Description -

SQL : SQL Table (Test 1)

Question : Which is TRUE about DELETE?

Solution :
307020260520074431 Correct Answer : Deletes selected rows

Description -

SQL : SQL Table (Test 1)

Question : Which command is used before removing a table permanently?

Solution :
68620260520074338 Correct Answer : DROP TABLE

Description -

SQL : SQL Table (Test 1)