how to select top 1 from a table like in sqlserver
Just like the question, I want to get the first row of the table
select top 1 * from tableA order by update_time;
but the squirrel shows the error wrong syntax, rownumber= 1 can not work too.
How to get the first row ?
select top 1 * from tableA order by update_time;
but the squirrel shows the error wrong syntax, rownumber= 1 can not work too.
How to get the first row ?
0
Comments
The best way to do this is given by Benny, but there are other alternatives, in case you want to try
Suppose I have a table like this. 1, Using max function 2. Using ROW_NUMBER So there are many ways you can achieve this.
Best way is to use a LIMIT function .
Also , just have a look at OFFSET function