INSERT

The INSERT statement inserts a new row into the table.

INSERT STATEMENT

				
					INSERT INTO jamfinity (id, name, age) 
VALUES (1, 'Jamil Jahangir', 22);

				
			

We create our table in our previous post:

Let’s break down the statement:
  • If we want to insert a new row into our table, we have use the code “INSERT INTO
  • The code INSERT INTO is  followed by the table name. Here, the name of the table is jamfinity
  • The next set of clauses are very important. We write the values of the rows in the format – VALUES (id, name, age);
  • We have insertedid value of 1 of data type – INTEGER in the column
  • Jamil Jahangir added to  name column of data type – text
  • 22 added to agecolumn of data type – INTEGER
 
Important points:
  • Make sure to write INTO after INSERT
  • End the statement with a Semicolon.
0 0 votes
Article Rating
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments