How To Select Some Columns from a Table in Oracle?
Submitted by: AdministratorIf you want explicitly tell the query to some columns, you can specify the column names in SELECT clause. The following select statement returns only two columns from the table "departments":
SQL> SELECT location_id, department_name FROM DEPARTMENTS;
<pre>LOCATION_ID DEPARTMENT_NAME
----------- ------------------------------
1700 Administration
1800 Marketing
1700 Purchasing
2400 Human Resources
1500 Shipping
1400 IT
2700 Public Relations
2500 Sales
1700 Executive
......</pre>
Submitted by: Administrator
SQL> SELECT location_id, department_name FROM DEPARTMENTS;
<pre>LOCATION_ID DEPARTMENT_NAME
----------- ------------------------------
1700 Administration
1800 Marketing
1700 Purchasing
2400 Human Resources
1500 Shipping
1400 IT
2700 Public Relations
2500 Sales
1700 Executive
......</pre>
Submitted by: Administrator
Read Online Oracle Database Job Interview Questions And Answers
Top Oracle Database Questions
☺ | How To Shutdown Your 10g XE Server? |
☺ | How To Write Date and Time Interval Literals in Oracle? |
☺ | How Much Memory Your 10g XE Server Is Using? |
☺ | How To Use Values from Other Tables in UPDATE Statements using Oracle? |
☺ | How To Create Tables for ODBC Connection Testing? |
Top DB Oracle Categories
☺ | Oracle PL-SQL Interview Questions. |
☺ | Oracle DBA Interview Questions. |
☺ | Oracle D2K Interview Questions. |
☺ | OCI Interview Questions. |
☺ | Oracle RMAN Interview Questions. |