I need to convert this MySQL
query to a SQL Server
query where the syntax 'LIMIT ?, ?'
is my main main problem because isn't compatible with SQL Server
.
At the same time I don't know the meaning of the clause at the end SELECT FOUND_ROW()
.
I am beginner with databases so I would appreciate any assistance.
SELECT SQL_CALC_FOUND_ROWS TITLE, URL FROM SITE WHERE CITY='Berlin' LIMIT ?, ?
...
stmt.setInt(1, offset);
stmt.setInt(2, numRecords);
...
rs = stmt.executeQuery("SELECT FOUND_ROWS()");
if (rs.next())
this.noOfRecords = rs.getInt(1);
...
Copyright Notice:Content Author:「user1288792」,Reproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/15979814/convert-mysql-query-to-microsoft-sql-server