SQL tutorial | Interview questions | Oracle
Would you like to react to this message? Create an account in a few clicks or log in to continue.

How To Select Some Columns from a Table?

Go down

How To Select Some Columns from a Table? Empty How To Select Some Columns from a Table?

Post by Micheal Sun Jan 17, 2010 3:01 am

If 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;
LOCATION_ID DEPARTMENT_NAME
----------- ------------------------------
1700 Administration
1800 Marketing
1700 Purchasing
2400 Human Resources
1500 Shipping
1400 IT
2700 Public Relations
2500 Sales
1700 Executive

Micheal
Admin

Posts : 243
Join date : 2010-01-10

http://sql-tutorial.co.cc

Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum