PEPPLER.ORG
Michael Peppler
Sybase Consulting
Menu
Home
Sybase on Linux
Install Guide for Sybase on Linux
General Sybase Resources
General Perl Resources
Freeware
Sybperl
Sybase::Simple
DBD::Sybase
BCP Tool
Bug Tracker
Mailing List Archive
Downloads Directory
FAQs
Sybase on Linux FAQ
Sybperl FAQ
Personal
Michael Peppler's resume

sybperl-l Archive

Up    Prev    Next    

From: Matthew E Studley <matthew at coms dot com>
Subject: select... for update
Date: Oct 2 2000 6:03PM

ladies and gents

quick transact sql q. if i may...

in oracle I can do something like this:

begin
  select col1 into var1 from table1 FOR UPDATE;
  .. some stuff
  update table1 set col2 = new_value where col1 = var1;

  error handling commit / rolllback etc

end

the FOR UPDATE bit gives me a lock on this data row.  

has anybody got any pointers on how I acquire a lock with a select
statement in transact sql? 

thanks for any help...

matt 

Matthew Studley
_____________________________________________________
Technical Architect		coms.com 
				126-128 New Kings Rd
+44 (0) 7080 810 101		London  SW6 3LZ.