Insert, update, delete

       In this category of SQL we change the content of the database. The first example is to insert a new row in a table. Here's a simple example.

INSERT INTO player
(p_name, password, gender)
VALUES
('jean','carrot35','man')
       Insert a row in the table "player", where p_name = "jean", password = "carrot35" and gender = "man".
       The next category is changing one or more rows, already existing. Here's a simple example.
UPDATE  player
SET     password = 'horse56'
WHERE   p_name = 'jean'
       Update the table "player" by setting password = "horse56" where p_name = "jean".
       Finally you can delete one or more rows. Here's a simple example.
DELETE FROM     player
WHERE           p_name = "jean"
       Delete rows in the table "player", where p_name = "jean".

Concept last updated: 06/05 2004.

Relations

is a kind of

Other sources

img-tag Insert, update, delete Javascript

Libellus