Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • SQL Tutorial -> Sql Delete

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 102
    Comment on it

    <-- Chapter 19: SQL UPDATE

    Chapter 20

    SQL DELETE


    DELETE statement is used to delete a particular data Rows from Database Table with the help of WHERE clause. Without WHERE clause all rows will be deleted.

    Lets see an example from the below table "employees" :-


    employee_id name code designation salary
    101 ABC E-101 Engineer 12000
    102 DEF E-102 Doctor 8000
    103 GHI E-103 Software Developer 8000
    104 JKL E-104 CEO 12000
    105 MNO E-105 Software Developer 100000

    DELETE SQL Statement Syntax :-


    DELETE FROM tablename
    WHERE column = value;
    

    UPDATE statement example :-


    DELETE FROM `employees`
    WHERE employee_id = 105;
    

    Now Run this Query, we will see the output below :-


    employee_id name code designation salary
    101 ABC E-101 Engineer 12000
    102 DEF E-102 Doctor 8000
    103 GHI E-103 Software Developer 8000
    104 JKL E-104 CEO 12000

    We can see here, Employee Id 105 is deleted.


    Chapter 21: SQL INJECTION -->

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: