SQL – Insert Into

INSERT INTO TableName  (fieldname1fieldname2 fieldname3)

VALUES (value1,   value2,   value3);

We specify the table name, then in brackets the fields we wish to insert to (you can add to all or only some). Note – the values and field names must be in the same order.

Next, we must specify the values to add to the database.

For example, to add a new film to the FILMS table:

 

 

 

 

 

INSERT INTO FILMS(Title, RatingRunningTime, Genre, Distributor)

VALUES (“Avengers: End Game“, 12, 182, “Action“,“Disney”);