Wednesday, September 16, 2009

Limit the rows that are retrieved by a query

Limiting Rows Using a Selection :
  • Restrict the rows that are returned by using the WHERE clause
  • The WHERE clause follows the FROM clause
  • SELECT *|{[DISTINCT] column|expression [alias],...} FROM table [WHERE condition(s)];
  • eg : select*from emp where deptno=10;
Character Strings and Dates :
  • Character strings and date values are enclosed by single quotation marks
  • Character values are case-sensitive, and date values are format-sensitive
  • eg : select*from emp where ename='CLARK';

No comments:

Post a Comment

Followers