• The UPDATE statement is used to update existing records in a table.

    eg.

    SQL UPDATE Syntax

    UPDATE table_name
    SET column1=value1,column2=value2,...
    WHERE some_column=some_value;




    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


    SQL UPDATE Example

    UPDATE Customers
    SET ContactName='Alfred Schmidt', City='Hamburg'
    WHERE CustomerName='Alfreds Futterkiste';


    The selection from the "Customers" table will now look like this:

    CustomerIDCustomerNameContactNameAddressCityPostalCodeCountry
    1

    Alfreds FutterkisteAlfred SchmidtObere Str. 57Hamburg12209Germany
    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

  • Sorry No animation Yet.

    We are Working On this


OUR PARTNERS&Website builderuCoz