Which of the following is not a DDL command?a)TRUNCATEb)ALTERc)CREATEd...
Explanation:
DDL stands for Data Definition Language, which is a set of SQL commands used to create, modify, and delete database structures. These commands are used to define the database schema, including tables, views, indexes, and constraints. DDL commands are not used to manipulate or modify data within the tables.
DDL Commands:
1. CREATE: The CREATE command is used to create a new database object, such as a table, view, or index. It is used to define the structure of the object and any associated constraints.
2. ALTER: The ALTER command is used to modify the structure of an existing database object. It can be used to add or remove columns, change data types, modify constraints, or rename objects.
3. TRUNCATE: The TRUNCATE command is used to remove all data from a table, while keeping the structure intact. It is similar to the DELETE command, but it is faster because it does not generate any transaction logs.
4. UPDATE: The UPDATE command is used to modify the data within a table. It is used to change the values of one or more columns in one or more rows.
Reason for D not being a DDL command:
The UPDATE command is used to modify the data within a table, which makes it a Data Manipulation Language (DML) command, not a Data Definition Language (DDL) command. DML commands are used to manipulate data within the tables, while DDL commands are used to define the structure of the database objects.
Conclusion:
In summary, the DDL commands are used to create, modify, and delete database structures, while the DML commands are used to manipulate data within the tables. The UPDATE command is an example of a DML command, not a DDL command.
Which of the following is not a DDL command?a)TRUNCATEb)ALTERc)CREATEd...
DDL commands are used to define the structure of the database, table, schemas, etc. It enables us to perform the operations like CREATE, DROP, ALTER, RENAME, and TRUNCATE schema objects.
An UPDATE command is used for managing the data stored in a database. It is an example of a DML command that also includes the INSERT and DELETE commands.
To make sure you are not studying endlessly, EduRev has designed Computer Science Engineering (CSE) study material, with Structured Courses, Videos, & Test Series. Plus get personalized analysis, doubt solving and improvement plans to achieve a great score in Computer Science Engineering (CSE).