+ 1
How to get first and last record from a table?
3 Answers
+ 2
you can to try this:
SELECT columns
FROM table
ORDER BY id DESC
LIMIT 1
UNION ALL
SELECT columns
FROM table
ORDER BY id ASC
LIMIT 1
+ 1
Select * from (select * from table_name order by rownum desc) where rownum=1
Union
Select * from(select * from table_name order by rownum) where rownum =1;
I found this solution
- 1
select columnname from tablename where firstname ='' and lastname ='';