var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
I have to fetch only the first and the last record from a table
SELECT FIRST 1 a.*
ORDER BY a.f1 ASC
The above query gets me the first record of the table a ordered by field f1.
Is it possible to get the last record in the same sql?
It's not a nice solution but it's a solution
where customer_num=(select min(customer_num) from customer)
or customer_num=(select max(customer_num) from customer)
from a a1
where a1.f1=(select min(a2.f1) from a a2)
or a1.f1=(select max(a3.f1) from a a3)