CRITICAL SKILL 2.2

Use Basic insert and select Statements

Getting data into and out of a database are two of the most important features of a database. Oracle provides two basic features that help you do just that. To get data into the database, use the insert command; to get it back out, use the select command. You must master these commands, as they form the basic of most data access to your Oracle database. This section talks first about how to get data into your database, and then how to get data out.

insert

Using the state table created in the DDL example, the following is an illustration of using the insert statement in its simplest form:

SQL> insert into state values ('AZ','Arizona');
1 row created.

Each time you execute an insert command, ...

Get Oracle Database 10g: A Beginner's Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.