📖 generic · 12th TN - English Medium · COMPUTER SCIENCE · Page 204question

STRUCTURED QUERY LANGUAGE (SQL) · Part 11

Chapter 2: 3 · COMPUTER SCIENCE

from the table. The syntax for TRUNCATE command is: TRUNCATE TABLE table-name; For example to delete all the records of the student table and delete the table the SQL statement is given as follows: TRUNCATE TABLE Student; The table Student is removed and the space is freed. . .

. DROP TABLE command T he DROP TABLE command is used to remove a table from the database. If you drop a table, all the rows in the table is deleted and the table structure is removed from the database. Once a table is dropped we cannot get it back, so be careful while using DROP TABLE command.

12th Computer Chapter - - The table can be deleted by DROP TABLE command in the following way: DROP TABLE table-name; For example to delete the Student table: DROP TABLE Student; DELETE, TRUNCATE AND DROP statement: DELETE The DELETE command deletes only the rows from the table based on the condition given in the where clause or deletes all the rows from the table if no condition is specified. But it does not free the space containing the table. TRUNCATE The TRUNCATE command is used to delete all the rows, the structure remains in the table and free the space containing the table. DROP The DROP command is used to remove an object from the database.

If you drop a table, all the rows in the table is deleted and the table structure is removed from the database. Once a table is dropped we cannot get it back. . .

DQL COMMAND– SELECT command One of the most important tasks when working with SQL is to generate Queries and retrieve data. A Query is a command given to get a desired result from the database table. The SELECT command is used to query or retrieve data from a table in the database. It is used to retrieve a subset of records from one or more tables.

The SELECT command can be used in various forms: Syntax of SELECT command : SELECT <column-list>FROM<table-name>; • Table-name is the name of the table from which

Related topics

Have a question about this topic?

Get an AI answer grounded in your actual textbook — with the exact page reference.

Ask AI about this topic →