Home » mysql » Insertion of a new record in a table

Insertion of a new record in a table

To insert a new record in a table we use Insert Query.
Syntax:

To insert all fields value in table we use following insert query

To insert all or selected fields value in table we use following insert query

We have created a table student as below

To insert record in above table we use insert query like below

to insert specific column value we have to provide column name in insert query

here we have not provided any value for id column because id is auto increment column so it will automatically increment id column value one by one.
To see inserted values in table we use

We have not provided value for few fields that is showing null.


Leave a comment

Your email address will not be published.

Managed by MochaHost - Fast & Easy WordPress Hosting