select * from TableName order by ID desc
offset 0 rows fetch next 20 rows only
Here 0 means starting from and 20 means how many records you want to fetch ....
Another great things in 2012 is ... you can use "Through" steatement direct inside the catch block ...
BEGIN TRY
DECLARE @VarToTest INT
SET @VarToTest = 'C'
END TRY
BEGIN CATCH
THROW
END CATCH
Quite superb ....
offset 0 rows fetch next 20 rows only
Here 0 means starting from and 20 means how many records you want to fetch ....
Another great things in 2012 is ... you can use "Through" steatement direct inside the catch block ...
BEGIN TRY
DECLARE @VarToTest INT
SET @VarToTest = 'C'
END TRY
BEGIN CATCH
THROW
END CATCH
Quite superb ....
No comments:
Post a Comment