header
  • prevSection
  • prev
  • nextSection
  • Navigation Arrow
  • SQL
  • Navigation Arrow
  • DML
  • Navigation Arrow
  • Insert

Data Manipulation Language (DML)

Now we have created our database schema we can use the Data Manipulation Language (DML) to add, view or modify data. There are four main commands we will consider, SELECT, INSERT, UPDATE and DELETE.

Insert

Now we know how to create tables the next step would be to fill those tables with data so we can do something with our database. We do this with the INSERT command. INSERT is probably the simples of DML commands. With INSERT we can add one or more records to our tables.

You must remember if you have any relationships that have dependencies on attributes in other tables you must do those tables first.

Here is the syntax

INSERT INTO table_name [(column_name, ...)]
VALUES (values [, values ... ] )
  • prevSection
  • prev
  • nextSection
  • Navigation Arrow
  • SQL
  • Navigation Arrow
  • DML
  • Navigation Arrow
  • Insert