Hi, i'm beginning with SQLite and it seems that the keyword LIMIT is 
  not supported on an UPDATE statement.
  Does anybody would have a workaround to update only the very first 
  row matching the search criteria ? Ex : 
  
  create table tbl1 ( id integer primary key autoincrement, ref 
  integer, sts varchar(16));
  insert into tbl1 (ref,sts) values (10, 'ready' );
  insert into tbl1 (ref,sts) values (20, 'ready' ); insert into tbl1 
  (ref,sts) values (30, 'ready' );
  update tbl1 set sts='busy' where sts='ready' ORDER BY ref DESC LIMIT 1;
  
  => i would like to have only the third record (30,'busy') updated.
  
  Thank's in advance.



                
---------------------------------
 Nouveau : téléphonez moins cher avec Yahoo! Messenger ! Découvez les tarifs 
exceptionnels pour appeler la France et l'international.Téléchargez la version 
beta.

Reply via email to