Sunday, January 12, 2025
HomeProgrammingOracle Insert Statement

Oracle Insert Statement

The Oracle INSERT statement is used to add new rows of data into a table. The basic syntax is:

sql

INSERT INTO table_name (column1, column2, …) VALUES (value1, value2, …);

  • Single Row Insert: Inserts one row at a time with specific column values.
See also  Java String Length Method with Examples

Multi-Row Insert: Inserts multiple rows using a SELECT statement.
Example:sql

INSERT INTO employees (id, name, salary)

SELECT id, name, salary FROM temp_employees;

You can also insert default or null values by skipping columns in the column list or explicitly using NULL. Use RETURNINGto retrieve values generated during the insert.

RELATED ARTICLES

HTML Form

Maven pom.xml file

0 0 votes
Article Rating

Leave a Reply

0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
- Advertisment -

Most Popular

HTML Form

What are some funny memes?

Recent Comments

0
Would love your thoughts, please comment.x
()
x