SQL Delete Statement, SQL Tutorial, Global Guide Line Technology.
Bookmark Bookmark: SQL Delete Statement, SQL Tutorial Forum | Blog |

      Home                    

Basic SQL Guide.           
SQL Introduction.               
 What is Table?                  
 SQL Create Table.            
 SQL Insert Statement.      
 SQL Select Keyword.        
 SQL Order by clause.        
 SQL Count Statement.      
 SQL Group By Clause.      
 SQL Having Clause.          
 SQL Alias Tables.             
 SQL Join Tables.              
 SQL Outer Join.               
 SQL Update Statement.   
 SQL Delete Statement.
 SQL Distinct Keyword.      
 SQL Where Keyword.       
 SQL And Or Keyword.      
 SQL In Keyword.              
 SQL Between Keyword.   
 SQL Like Keyword.          
 SQL Functions.                
 SQL Concatenate.           
 SQL Substrings.               
 SQL Trim Function.         
 SQL Constraints.              
 SQL Primary Key.            
 SQL Foreign Key.            
 SQL Create Views.           
 SQL Create Index.           
 SQL Alter Table.             
 SQL Drop Table.             
 SQL Truncate Table.      
 SQL Summary.                

SQL Tutorial >> SQL Delete Statement.


     Back             Next     



Sometimes we may wish to get rid of records from a table. To do so, SQL Tutorial will guide how to use the DELETE FROM command, by the use of SQL Delete From keyword we can remove any record from the existing table in the database. The syntax for SQL Delete Statement is as under

Syntax for SQL Delete Statement

DELETE FROM "table_name"
WHERE {condition}

It is easiest to use an example. Say we currently have a table as below to experiment with SQL Delete Statement.

Table Employees_Salary
 
FirstName Month Salary
Austin January 1000$
Austin February 1100$
Creston February 1100$
Kate February 1100$
Angela February 1000$
Bobbi February 1200$
Cute February 1300$

Example of SQL Delete Statement

DELETE FROM Employees_Salary
WHERE FirstName = "Austin"
AND Month = "January"


Now the content of table would look like after deletion of records

Table Employees_Salary
 
FirstName Month Salary
Austin February 1100$
Creston February 1100$
Kate February 1100$
Angela February 1000$
Bobbi February 1200$
Cute February 1300$

     Back             Next     
 

[ About ] [ Contact ] [ Home ]
[ Links ] [ Site Map ] [ Services ] [ Privacy ]

Copyright 2005 -  2018 www.globalguideline.com All rights reserved. (Best viewed in IE 6.0+ or Firefox 2.0+ at 1024 * 768 or higher) 271 visitors are online now