![]() |
|
|
SQL explained: What is SQL | Select Statement | Select Where | Insert | Update/Edit | Delete | Order By | Select Between SQL Insert StatementThe SQL Insert statement is simply used to insert data (add rows) into a database. Syntax: INSERT INTO TableName (Column1,Column2) VALUES ('Value1','Value2') TableName is the name of the table you want to insert the data into. Column1 and Column 2 are the names of the Columns you want to put that data into and Value1 and Value2 are the corresponding values you want to insert. Let's use a table called 'Members_tbl' that holds 2 records as shown in Diagram 1.
To add a third record we could use the highlighted SQL insert statement below. INSERT INTO Members_tbl (FirstName,LastName,Address,City) VALUES ('Henry','Cole','123 Smut Road','Dublin') Diagram 2 illustrates what our revised table will look like after the SQL statement has been run.
Site developed by Michael Wall - Web Design Belfast N.Ireland. |
|