26 Lecture
CS403
Midterm & Final Term Short Notes
Categories of SQL Commands
SQL commands can be broadly categorized into four categories: data definition language (DDL), data manipulation language (DML), data control language (DCL), and transaction control language (TCL). DDL commands are used to define and modify datab
Important Mcq's
Midterm & Finalterm Prepration
Past papers included
Download PDF
Which category of SQL commands is used to define and modify database objects such as tables and indexes? A. Data Manipulation Language (DML) B. Data Definition Language (DDL) C. Data Control Language (DCL) D. Transaction Control Language (TCL) Answer: B Which category of SQL commands is used to manipulate data in database objects? A. Data Manipulation Language (DML) B. Data Definition Language (DDL) C. Data Control Language (DCL) D. Transaction Control Language (TCL) Answer: A Which category of SQL commands is used to control access to the database? A. Data Manipulation Language (DML) B. Data Definition Language (DDL) C. Data Control Language (DCL) D. Transaction Control Language (TCL) Answer: C Which category of SQL commands is used to manage transactions and ensure data consistency? A. Data Manipulation Language (DML) B. Data Definition Language (DDL) C. Data Control Language (DCL) D. Transaction Control Language (TCL) Answer: D Which SQL command falls under the DDL category? A. SELECT B. UPDATE C. INSERT D. CREATE Answer: D Which SQL command falls under the DML category? A. ALTER B. DELETE C. DROP D. GRANT Answer: B Which SQL command falls under the DCL category? A. UPDATE B. REVOKE C. INSERT D. DELETE Answer: B Which SQL command falls under the TCL category? A. COMMIT B. SELECT C. WHERE D. FROM Answer: A Which SQL command is used to create a new table in a database? A. INSERT B. UPDATE C. DELETE D. CREATE Answer: D Which SQL command is used to add a new row of data to an existing table? A. DELETE B. INSERT C. UPDATE D. ALTER Answer: B
Subjective Short Notes
Midterm & Finalterm Prepration
Past papers included
Download PDF
What is the purpose of Data Definition Language (DDL) commands in SQL? Answer: DDL commands are used to define and modify database objects such as tables and indexes. Give an example of a DDL command in SQL. Answer: CREATE TABLE is an example of a DDL command in SQL. What is the purpose of Data Manipulation Language (DML) commands in SQL? Answer: DML commands are used to manipulate data in database objects such as tables. Give an example of a DML command in SQL. Answer: SELECT is an example of a DML command in SQL. What is the purpose of Data Control Language (DCL) commands in SQL? Answer: DCL commands are used to control access to the database. Give an example of a DCL command in SQL. Answer: GRANT is an example of a DCL command in SQL. What is the purpose of Transaction Control Language (TCL) commands in SQL? Answer: TCL commands are used to manage transactions and ensure data consistency. Give an example of a TCL command in SQL. Answer: COMMIT is an example of a TCL command in SQL. What is the difference between a DDL and a DML command in SQL? Answer: DDL commands are used to define and modify database objects, while DML commands are used to manipulate data in those objects. What is the difference between a DCL and a TCL command in SQL? Answer: DCL commands are used to control access to the database, while TCL commands are used to manage transactions and ensure data consistency.