We can utilize two different ways for entering data in a given table of SQL. First, we can put data in a row; the second is to put many rows at the same moment.
Put into Values
The basic structure for putting values in single row of the table is given here;
VALUES ("value2", "value3", ...)
For example, we have the following data;
Column Name Data Type
We have to add one more row for the data related to Boston on March 08, 2011. The sale of that day is $700.
VALUES ('Boston', 700, 'Mar-08-2011')
Put into Pick:
We can put many rows in a table by using the other INSERT INTO command. By using a statement SELECT, we can choose data which we have to put in the table. Here, we can use data of any other table for insertion. The structure for this purpose is given below;
SELECT "column4", "column5", ...
The above syntax is in trouble-free way. But we can us GROUP BY, HAVING and WHERE clauses.
In case, we have 2 tables. One is Store information and the other is Sales information.
SELECT name, Date, Sales
WHERE Year(Date) = 2010
The SQL syntax is used here. Diverse databases have changed syntax for the same purpose.