Is there an equivalent of NOLOCK table hint of MSSQL in Sybase 15.5 T-SQL?

Anthony Kong picture Anthony Kong · May 16, 2013 · Viewed 9.4k times · Source

I am writing an app that pull data from a sybase table rather frequently. Since I will not write any data back to the database, I want to increase the read performance by not holding data locks on the target table.

In MSSQL I can do it via table hint NOLOCK. Is there a equivalent in the Sybase T-SQL?

Answer

Michael Gardner picture Michael Gardner · May 17, 2013

First, let me say that it's not recommended to use NOLOCK.

I believe the locking hint you are looking for is noholdlock or at isolation, but the syntax varies depending on if you are trying to use it at the session level, the query level, or for specific tables within a query.

The full explanation can be found here in the Locking and Concurrency Control documents from Sybase.