How Do You Create Views In Oracle SQL?
Creating a view in Oracle SQL will retrieve information from the stored tables in the Oracle database. The typical approach is to specify the table name and the list of column names where the data are stored. The most direct method is using the “Select” keyword, the “From” keyword and “Where” keyword, along with ending the SQL statement with a semicolon (;). Open Oracle SQL*Plus and log on at the Dialog Box by entering your user name and password and then clicking “OK.” Entering the “Select” statement and asterisk character (*) will retrieve all the columns of the customer table. SQL> select * FROM customers; CUSTOMER_ID FIRST_NAME LAST_NAME DOB PHONE STATE ———– ———- ———- ——— ———— ———- 1 Jim Stewart 01-JAN-70 800-555-1225 FLrn 2 Jane Isle 02-MAR-80 800-555-1212 NJ Enter in the “Select” statement. The results of the code will display the customer with a customer ID that equals 2.