In Sybase, I can specify the locking schema for the table if it is, data rows, pages or table lock.
The below is an example in SYBASE
how to create a table with specifying the lock table.
create table dbo.EX_EMPLOYEE(
TEXT varchar(1000) null
)
alter table EX_EMPLOYEE lock allpages
go
In SQL server there are such lock tables(SO answer) but can I specify the lock for the table?
My question: Can I specify the table type of locks ? or in SQL server it is different? Does it depend on the query that I run?
in this link it says :
As Andreas pointed out there is no default locking level locks are taken as per operation you are trying to perform in the database. Just some examples. If it is delete/update for a particular row exclusive lock will be taken on that row If it is select operation Shared lock will be taken If it is altered table Schema Mod lock will be taken soon and so forth As Jeremy pointed out If you are looking for Isolation level it is read committed.
are they are right ? can I say that locking table in Sybase is different than SQL server?