Click here to Skip to main content
15,799,019 members
Home / Discussions / Database
   

Database

 
GeneralRe: Firebird : SQL to Get record today only Pin
kerek224-Jan-21 14:03
kerek224-Jan-21 14:03 
AnswerRe: Firebird : SQL to Get record today only Pin
Mycroft Holmes22-Jan-21 12:00
professionalMycroft Holmes22-Jan-21 12:00 
AnswerRe: Firebird : SQL to Get record today only Pin
DerekT-P23-Jan-21 9:18
professionalDerekT-P23-Jan-21 9:18 
GeneralRe: Firebird : SQL to Get record today only Pin
kerek224-Jan-21 14:09
kerek224-Jan-21 14:09 
QuestionRe: Firebird : SQL to Get record today only Pin
David Crow12-Mar-21 7:40
David Crow12-Mar-21 7:40 
QuestionSQL Server: Retry update if fail Pin
Mou_kol8-Jan-21 5:22
Mou_kol8-Jan-21 5:22 
AnswerRe: SQL Server: Retry update if fail Pin
Richard Deeming8-Jan-21 5:49
mveRichard Deeming8-Jan-21 5:49 
QuestionSQL Server Difference among ROWLOCK ,UPDLock AND xlock Pin
Mou_kol8-Jan-21 5:19
Mou_kol8-Jan-21 5:19 
I have some confusion about lock (ROWLOCK ,UPDLock AND xlock). i want to know the difference among these locks. where to use UPDLock, when to use RowLock and when Xlock with a example for better clarification.

1)
SQL
BEGIN TRANSACTION
    
 SELECT @ID=RowID FROM MyTable WITH (ROWLOCK, XLOCK, HOLDLOCK) WHERE ID=6822


In the above sql rowlock and XLOCK both use as a result from other session records 6822 could not be read or modify. XLOCK alone is capable to lock the rows....so why one should use ROWLOCK & XLOCK together ?

if i use only xlock & HOLDLOCK then it will not serve the purpose ?

2) Tell me with example what is the difference between ROWLOCK & UPDLOCK ?
ROWLOCK prevent other session to modify data and UPDLOCK does the same thing. so what is the difference
between ROWLOCK & UPDLOCK ?

Please anyone explain these difference with example as a result at my end i can run the example code and understand.

Thanks
AnswerRe: SQL Server Difference among ROWLOCK ,UPDLock AND xlock Pin
Richard Deeming8-Jan-21 5:51
mveRichard Deeming8-Jan-21 5:51 
GeneralRe: SQL Server Difference among ROWLOCK ,UPDLock AND xlock Pin
Mou_kol8-Jan-21 6:01
Mou_kol8-Jan-21 6:01 
GeneralRe: SQL Server Difference among ROWLOCK ,UPDLock AND xlock Pin
Eddy Vluggen26-Jan-21 13:31
professionalEddy Vluggen26-Jan-21 13:31 
QuestionStoring Entity states in DB Pin
kabuto1787-Dec-20 17:31
kabuto1787-Dec-20 17:31 
AnswerRe: Storing Entity states in DB Pin
Richard Deeming7-Dec-20 23:36
mveRichard Deeming7-Dec-20 23:36 
GeneralRe: Storing Entity states in DB Pin
Mycroft Holmes8-Dec-20 11:56
professionalMycroft Holmes8-Dec-20 11:56 
GeneralRe: Storing Entity states in DB Pin
kabuto1789-Dec-20 14:35
kabuto1789-Dec-20 14:35 
QuestionResetting Value of Each User At Once (PHP MYSQLI) Pin
nateola444-Dec-20 23:14
nateola444-Dec-20 23:14 
QuestionRe: Resetting Value of Each User At Once (PHP MYSQLI) Pin
Richard MacCutchan5-Dec-20 0:05
mveRichard MacCutchan5-Dec-20 0:05 
QuestionThe Best Free Database for real-time data storing and querying Pin
Member 1332584625-Oct-20 21:04
Member 1332584625-Oct-20 21:04 
AnswerRe: The Best Free Database for real-time data storing and querying Pin
Victor Nijegorodov25-Oct-20 22:39
Victor Nijegorodov25-Oct-20 22:39 
GeneralRe: The Best Free Database for real-time data storing and querying Pin
Member 1332584627-Oct-20 23:17
Member 1332584627-Oct-20 23:17 
GeneralRe: The Best Free Database for real-time data storing and querying Pin
Richard MacCutchan28-Oct-20 0:09
mveRichard MacCutchan28-Oct-20 0:09 
GeneralRe: The Best Free Database for real-time data storing and querying Pin
Member 1332584628-Oct-20 1:26
Member 1332584628-Oct-20 1:26 
GeneralRe: The Best Free Database for real-time data storing and querying Pin
Jörgen Andersson28-Oct-20 3:15
professionalJörgen Andersson28-Oct-20 3:15 
GeneralRe: The Best Free Database for real-time data storing and querying Pin
Member 1332584629-Oct-20 19:47
Member 1332584629-Oct-20 19:47 
AnswerRe: The Best Free Database for real-time data storing and querying Pin
Mycroft Holmes28-Oct-20 13:07
professionalMycroft Holmes28-Oct-20 13:07 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.