Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Update Once

Status
Not open for further replies.

curvv

IS-IT--Management
Jan 11, 2001
103
ZA
Hi,

Say i've got in a table two records both with a name value of Joe. I want to update ONE of these records(doesn't matter which). Is it possible to have something like:

UPDATE ONCE mytable SET country='ZA' WHERE name='Joe'

thanx
Chris ######## CtN ########
 
use the LIMIT statement

UPDATE mytable SET country='ZA' WHERE name='Joe' LIMIT 1
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top