Pages

Friday, 25 March 2011

INSERT INTO Statement in Oracle SQL Plus

The INSERT INTO Statement is used to insert new records in a table. A brief demonstration of INSERT INTO statement is provided in this article.


 In this syntax column names are specified and we can leave a cell as NULL i.e. we can fill the data in desired columns or fields.


INSERT INTO table_name (column1, column2, column3, .........)
VALUES (value1, value2, value3, .....................);


Example :
1.

INSERT INTO EmpInfo VALUES(5, 'BA0005', 'JOHN', 'SMITH', 'AUSTIN');

insertinto1.gif
2.

INSERT INTO EmpInfo(RigNo, FirstName, LastName) VALUES(6, 'GARRY', 'BOND');

insertinto2.gif
In above image we can see that EmpId & City Fields are remained NULL and data is filled in RigNo, FirstName & LastName.


Note - Field's Name (Column Name) is not case sensitive; if and only if not written in double quotes ("..."). For example please consider the first line in images given above...


Login to add your contents and source code to this article C# Consulting is founded in 2002 by the founders of C# Corner. Unlike a traditional consulting company, our consultants are well-known experts in .NET and many of them are MVPs, authors, and trainers. We specialize in Microsoft .NET development and utilize Agile Development and Extreme Programming practices to provide fast pace quick turnaround results. Our software development model is a mix of Agile Development, traditional SDLC, and Waterfall models.


Hope this helps,

0 comments:

Post a Comment

 
Powered by Blogger