Back-End Development SQL basics

SQL INSERT

The SQL INSERT INTO Statement is used to add new rows of data to a table in the database.

Syntax:

Demo database: Customers

C.id C.name C.contact C.address
123eed3 Ramesh 987654321 #12,sec-4 mohali
aa22103 Tarun 987650000 #12,sec-14 b chd
00146hh Sia 812300912 #212,sec-86 panchukula
144dcv4 Rahul 700912366 #001,sec-19 c chd

SQL INSERT examples:


Result:

C.id C.name C.contact C.address
123eed3 Ramesh 987654321 #12,sec-4 mohali
aa22103 Tarun 987650000 #12,sec-14 b chd
00146hh Sia 812300912 #212,sec-86 panchukula
144dcv4 Rahul 700912366 #001,sec-19 c chd
aa23120a Bani 981234577 #45, colony abc


Result:

C.id C.name C.contact C.address
123eed3 Ramesh 987654321 #12,sec-4 mohali
aa22103 Tarun 987650000 #12,sec-14 b chd
00146hh Sia 812300912 #212,sec-86 panchukula
144dcv4 Rahul 700912366 #001,sec-19 c chd
aa23120a Bani 981234577 #45, colony abc
vc4100a Rita ora 01234555 #01, colony sde