SQL, or Structured Query Language, is a language used in programming to manage data held in a relational database management system. To query data is to request data from a table or combination of tables. SQL has a lot of capabilities.
There are many different versions of the SQL language, but each version must support these major commands
Today, we will go over all of these commands
Insert is used to place new rows inside of a table. There are 2 ways to write an insert statement.
Insert adding values without specifying columns
If you are going to add values for every column in a table you simply follow the example below and do not need to specify the columns in your statement. It is important though, that you write your values in the correct order as they exist in the table based on the columns.
INSERT INTO TABLE_NAME
Insert adding values with specifying columns
This method allows you to create your own mapping to columns and your values. You also can only specify certain columns and SQL will only insert a row of data for those columns
INSERT INTO TABLE_NAME(column1,column2,column3, column4,...)
You would replace TABLE_NAME with the name of your table
You would replace column1 with whatever your first column is and follow that same pattern for the other columns
You would replace value1 with whatever value you would like placed in the first column and follow that same pattern for the other values
INSERT INTO TestLeadTable
This will create a record that has the values Drake, NY, 40, and ManualQA