+ Reply to Thread
Results 1 to 2 of 2

Thread: Update table field x where field y equal to z

  1. #1
    Junior Member
    Join Date
    Jan 2012
    Posts
    22

    Update table field x where field y equal to z

    I got 3 fields , X Y and Z
    I want to update the field X if Y = Z
    I tried :
    Code:
    INSERT INTO dbo.Cities (County_Id) 
    WHERE Code >= 10000 AND Code < 20000
    VALUE 20

  2. #2
    Junior Member
    Join Date
    May 2012
    Posts
    27
    I guess there is the fix for it :
    Code:
    UPDATE Cities SET County_Id = 20 WHERE Cities.Code >= 10000 AND Cities.Code < 20000

+ Reply to Thread

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts