table-level locking
MS SQL:
SET @m_Hit = (SELECT hit FROM totalhits WITH (TABLOCKX))
SET @m_Hit = @m_Hit + 1
PostgreSQL:
method 1:
SELECT hit INTO m_Hit FROM totalhits FOR UPDATE;
m_Hit = m_Hit + 1;
method 2:
LOCK TABLE pagehit IN SHARE ROW EXCLUSIVE MODE;
SELECT hit INTO m_Hit FROM totalhits;
m_Hit = m_Hit + 1;
1 Comments:
Hi greeat reading your blog
12:12 AM
Post a Comment
<< Home