Sql result b where condition

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi all,
I have a table emp. using where condition can i get the result prioritized.
Take the example below.

select ENAME,ORIG_SALARY from employee where (ename='Tom' and orig_salary=2413)or(orig_salary=1234 )

if the fist condition(ename='Tom' and orig_salary=2413) is satified then 10 rows will be returned, for the second condition (orig_salary=1234 ) there are 20 rows will be returned.
The order of display should be

The first 10 rows then
next 20 rows.
Thanks & Regards,
Ram



--
Sent via pgsql-performance mailing list (pgsql-performance@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-performance

[Postgresql General]     [Postgresql PHP]     [PHP Users]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Yosemite]

  Powered by Linux