DML : Data Manipulation Language.
In the earlier sessions , we have discussed about the following DML Commands:
DELETE is a DDL command which is used to delete or remove data from a table.
In simple terms DELETE Command deletes data from tables.
Syntax for DELETE Command is as follows:
DELETE FROM <Table Name>
Example:
Assume that we have a table (MYPASSWORDS) with the following information. This table contains list of my email ids and corresponding passwords.
Here is the query which can be used to delete (remove) data from MYPASSWORDS table.
DELETE FROM MYPASSWORDS
Below screen shot contains the data from MYPASSWORDS table before and after the execution of DELETE query:
That is after executing DELETE command on MYPASSWORDS table, data is deleted or removed from that table.
Summary:
This article explains about How DELETE Command can be used in SQL SERVER.
In the earlier sessions , we have discussed about the following DML Commands:
DELETE is a DDL command which is used to delete or remove data from a table.
In simple terms DELETE Command deletes data from tables.
Syntax for DELETE Command is as follows:
DELETE FROM <Table Name>
Example:
Assume that we have a table (MYPASSWORDS) with the following information. This table contains list of my email ids and corresponding passwords.
ACCOUNT | ACCOUNTID | PWD |
GMAIL | catchme@gmail.com | asderuom09 |
GMAIL | sqldeveloper@gmail.com | sqlpor739 |
GMAIL | sqldeveloper@gmail.com | sqlpor739 |
YAHOL | myyahooid@yahoo.com | olju67 |
YAHOL | sqlmyid@yahoo.com | itryry67 |
Here is the query which can be used to delete (remove) data from MYPASSWORDS table.
DELETE FROM MYPASSWORDS
Below screen shot contains the data from MYPASSWORDS table before and after the execution of DELETE query:
That is after executing DELETE command on MYPASSWORDS table, data is deleted or removed from that table.
Summary:
This article explains about How DELETE Command can be used in SQL SERVER.