Returning All Columns : Select « Select Query « Oracle PL / SQL






Returning All Columns

    
SQL>
SQL> CREATE TABLE emp (
  2     empID INT NOT NULL PRIMARY KEY,
  3     Name      VARCHAR(50) NOT NULL);

Table created.

SQL> INSERT INTO emp (empID,Name) VALUES (1,'Tom');

1 row created.

SQL> INSERT INTO emp (empID,Name) VALUES (2,'Jack');

1 row created.

SQL> INSERT INTO emp (empID,Name) VALUES (3,'Mary');

1 row created.

SQL> INSERT INTO emp (empID,Name) VALUES (4,'Bill');

1 row created.

SQL> INSERT INTO emp (empID,Name) VALUES (5,'Cat');

1 row created.

SQL> INSERT INTO emp (empID,Name) VALUES (6,'Victor');

1 row created.

SQL>
SQL>
SQL> SELECT * FROM emp;

     EMPID NAME
---------- --------------------------------------------------
         1 Tom
         2 Jack
         3 Mary
         4 Bill
         5 Cat
         6 Victor

6 rows selected.

SQL>
SQL>
SQL> drop table emp;

Table dropped.

   
    
    
    
  








Related examples in the same category

1.The following code provides a breakdown of the basic SELECT statement on the Oracle platform:
2.Use Arithmetic operators with literal values to derive values: add 5 to salary
3.SELECT statement uses the not equal (< >) operator in the WHERE clause
4.Using the > operator
5.UPPER(SUBSTR(first_name, 2, 8)): Combining Functions
6.Plus in select statement
7.Minus in select
8.Math calculation in select
9.CONCATENATING TEXT
10.Returning Multiple Columns
11.Returning Rows Call
12.Employees from new york who have gifts
13.Find all employees who are younger than employee whose id is 9999
14.Selecting Categories That Contain Product
15.Selecting Products That Belong to Category
16.Selecting Products That Belong to Department with Join
17.Using select statement and char function to create insert statement