Database - Introduction to SQL - Discussion
Discussion Forum : Introduction to SQL - General Questions (Q.No. 2)
2.
The command to remove rows from a table 'CUSTOMER' is:
Discussion:
29 comments Page 1 of 3.
Aniley Belayneh said:
1 decade ago
The DELETE statement is used to delete rows in a table.
SQL DELETE Syntax
DELETE FROM table_name
WHERE some_column=some_value
////////////////////////////////////////
Note: Notice the WHERE clause in the DELETE syntax. The WHERE clause specifies which record or records that should be deleted. If you omit the WHERE clause, all records will be deleted!
SQL DELETE Syntax
DELETE FROM table_name
WHERE some_column=some_value
////////////////////////////////////////
Note: Notice the WHERE clause in the DELETE syntax. The WHERE clause specifies which record or records that should be deleted. If you omit the WHERE clause, all records will be deleted!
Manche Shekhar said:
1 decade ago
The delete command is used to remove records from a table.
The syntax of delete command is as follow:
Delete from <tablename>;
If u want to remove a particular record then we use where clause.
The syntax of delete command is as follow:
Delete from <tablename> where <condition>;
The syntax of delete command is as follow:
Delete from <tablename>;
If u want to remove a particular record then we use where clause.
The syntax of delete command is as follow:
Delete from <tablename> where <condition>;
Shik said:
7 years ago
Truncate -- if we truncate a table, the structure of the table remains same and the data inside the table will be deleted.
BUT IN, Delete --- whole table or particular row is deleted. Here the structure of the table is also deleted.
BUT IN, Delete --- whole table or particular row is deleted. Here the structure of the table is also deleted.
(2)
Swopna said:
1 decade ago
drop command is used to drop the table entirely.....the table structure will be deleted and update is used to make the changes....delete is used to delete a particular row or column.....i don't know about remove as we haven't used it
Gouthami.g said:
1 decade ago
Delete is used to delete all rows or particular rows from a table.
Eg:
Sql> delete from table name;
O/p: all rows are deleted.
Eg:
Sql> delete table name where column name = value;
O/p: particular rows are deleted.
Eg:
Sql> delete from table name;
O/p: all rows are deleted.
Eg:
Sql> delete table name where column name = value;
O/p: particular rows are deleted.
Kiran Kumar said:
1 decade ago
Both delete and drop are useful for this but with drop we can delete one or total table we can remove where as by using delete with conditions we can delete the rows which are satisfying with that conditions.
Dilip Kumar said:
1 decade ago
Drop table tablename; removes the table from database temporarily whereas drop table tablename purge; command removes the table from database permanently.
This is updated one.
This is updated one.
Rithy said:
9 years ago
What is the difference between truncate and delete command? Because both commands are used to delete rows in a table. Which one is preferable?
Thanks in advance!
Thanks in advance!
(1)
Harsha said:
10 years ago
This statement is used to delete records in a table.
By using where statement we can specify which regard to be deleted. Or else whole will be deleted.
By using where statement we can specify which regard to be deleted. Or else whole will be deleted.
Rakesh dasari said:
1 decade ago
Update used only to make changes in existing records, reamainin options are used to do operations on the table not individual columns.
Post your comments here:
Quick links
Quantitative Aptitude
Verbal (English)
Reasoning
Programming
Interview
Placement Papers