• The DELETE statement is used to delete rows in a table.


    eg.


    CustomerIDCustomerNameContactNameAddressCityPostalCodeCountry
    1

    Alfreds FutterkisteMaria AndersObere Str. 57Berlin12209Germany
    2Ana Trujillo Emparedados y heladosAna TrujilloAvda. de la Constitución 2222México D.F.05021Mexico
    3Antonio Moreno TaqueríaAntonio MorenoMataderos 2312México D.F.05023Mexico
    4

    Around the HornThomas Hardy120 Hanover Sq.LondonWA1 1DPUK
    5Berglunds snabbköpChristina BerglundBerguvsvägen 8LuleåS-958 22Sweden


    DELETE Example:

    To delete the customer "Alfreds Futterkiste" from the "Customers" table.

    We use the following SQL statement:

    DELETE FROM Customers
    WHERE CustomerName='Alfreds Futterkiste' AND ContactName='Maria Anders';

    The "Customers" table will now look like this:

    CustomerIDCustomerNameContactNameAddressCityPostalCodeCountry
    2Ana Trujillo Emparedados y heladosAna TrujilloAvda. de la Constitución 2222México D.F.05021Mexico
    3Antonio Moreno TaqueríaAntonio MorenoMataderos 2312México D.F.05023Mexico
    4

    Around the HornThomas Hardy120 Hanover Sq.LondonWA1 1DPUK
    5Berglunds snabbköpChristina BerglundBerguvsvägen 8LuleåS-958 22Sweden


    Delete All Data: 

    DELETE FROM table_name;

    or

    DELETE * FROM table_name;


  • Sorry No animation Yet.

    We are Working On this


OUR PARTNERS&Website builderuCoz