1SELECT
2 (SELECT * FROM tableName ORDER BY col1 LIMIT 1) AS first,
3 (SELECT * FROM tableName ORDER BY col1 DESC LIMIT 1) AS last
4;
1(select *from DemoTable694 order by EmployeeId ASC LIMIT 1)
2UNION
3(select *from DemoTable694 order by EmployeeId DESC LIMIT 1);