Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • Inserting data using replace statement

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 441
    Comment on it

    REPLACE INTO Statement:

    It is used to insert a row in a table.It is similar to INSERT INTO statement but it does not allow duplicate row as it replaces the old one with the new one.

    Syntax:

    REPLACE INTO tablename (column1, column2, column3) VALUES( value1, value2, value3);
    

    Example:

    REPLACE INTO Employee (name, city) VALUES ( 'Amit', 'Dehradun');
    

    This query will insert Amit in name column and dehradun in city column but if the same name and city are already present in the employee table than it will replace the old one with the new one.

 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: