SELECT SPECIFIC COLUMNS
SQL>
SQL> CREATE TABLE purchase (
2 product_name VARCHAR2(25) NOT NULL,
3 product_price NUMBER(4,2) NOT NULL,
4 purchase_date DATE
5 );
Table created.
SQL>
SQL>
SQL> INSERT INTO purchase (product_name, product_price) VALUES ('Product Name 2', 2.5);
1 row created.
SQL> INSERT INTO purchase (product_name, product_price) VALUES ('Product Name 3', 50.75);
1 row created.
SQL> INSERT INTO purchase (product_price, product_name) VALUES (99.99, 'Product Name 4');
1 row created.
SQL>
SQL>
SQL> SELECT product_name FROM purchase;
PRODUCT_NAME
-------------------------
Product Name 2
Product Name 3
Product Name 4
3 rows selected.
SQL>
SQL> SELECT product_name, purchase_date FROM purchase;
PRODUCT_NAME PURCHASE_
------------------------- ---------
Product Name 2
Product Name 3
Product Name 4
3 rows selected.
SQL>
SQL>
SQL> drop table purchase;
Table dropped.
SQL>
Related examples in the same category