![]() |
|
|
SQL explained: What is SQL | Select Statement | Select Where | Insert | Update/Edit | Delete | Order By | Select Between SQL Delete StatementThe SQL Delete statement is straightforward and is used to delete records (rows) in a table. Syntax: DELETE * FROM TableName If we wanted to delete all the records from our table 'Members_tbl' in diagram 1 below we could use the following Delete Statement DELETE * FROM Members_tbl We have just substituted 'TableName' with the name of our table 'Members_tbl' .
You can also use the delete statement in conjunction with the WHERE clause Syntax:DELETE * FROM Tablename Where ColumnName=Value If we wanted to delete the record(s) from the Members_tbl table shown in diagram 1 where the LastName is equal to Wall our SQL statement would look like this; DELETE * FROM Members_tbl Where LastName='Wall' The * wildcard is used to signify all the columns in a table.
Site developed by Michael Wall - Web Design Belfast N.Ireland. |
|