Friday, September 4, 2009

SQL SELECT Statement

Capabilities of SQL SELECT Statements :



Basic SELECT Statement :
  • SELECT * | {[DISTINCT] column | expression [alias],...} FROM table;
  • SELECT identifies the columns to be displayed
  • FROM identifies the table containing those columns
  • * specifies Selecting All Columns
  • column name specifies : selecting Specific Columns
  • eg1 : postgres=# select*from dept; (will return the all the columns of table dept)
  • eg2 : edb=# select deptno, dname from dept; (will return the specific columns of table dept)

No comments:

Post a Comment

Followers