Opentopia Directory Encyclopedia Tools

Delete (SQL)

Encyclopedia : D : DE : DEL : Delete (SQL)


A DELETE statement in SQL removes records in a relational database management system.

The DELETE statement has the following form:

DELETE FROM table_name [WHERE condition]
Any rows that match the WHERE condition will be removed from the table. If the WHERE clause is omitted, all rows in the table are removed.

The DELETE statement does not return any rows; that is, it will not generate a result set.

Executing a DELETE statement may cause triggers to run, which may cause other tables to be updated.

Examples

Delete value Lemon Meringue from table pies, where the column equals flavour:

DELETE FROM pies WHERE flavour='Lemon Meringue';
Delete rows in mytable, if the value of mycol is greater than 100.

DELETE FROM mytable WHERE mycol > 100;
Delete all rows from mytable:

DELETE FROM mytable;
Topics in database management systems (DBMS)[ view][ talk][ edit] )
Concepts
Database | Database model | Relational database | Relational model | Relational algebra | Primary key - Foreign key - Surrogate key - Superkey
Database normalization | Referential integrity | Relational DBMS | Distributed DBMS | ACID

Objects
Trigger | View | Table | Cursor | Log | Transaction | Index | Stored procedure | Partition
Topics in SQL
Select | Insert | Update | Merge | Delete | Join | Union | Create | Drop
Comparison of syntax

Implementations of database management systems
Types of implementations
Flat file | Deductive | Dimensional | Hierarchical | Object oriented | Temporal

Products
dBASE | Oracle | Sybase | MySQL | Microsoft SQL Server | PostgreSQL | DB2 | Comparison - relational | Comparison - object-relational
Components
Query language | Query optimizer | Query plan | ODBC | JDBC
Lists
List of object-oriented database management systems
List of relational database management systems
List of truly relational database management systems

 


From Wikipedia, the Free Encyclopedia. Original article here. Support Wikipedia by contributing or donating.
All text is available under the terms of the GNU Free Documentation License See Wikipedia Copyrights for details.

Search Titles
0123456789
ABCDEFGHIJ
KLMNOPQRST
UVWXYZ?

E-mail this article to:

Personal Message: