SQL question

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Zester
    Confirmed User
    • Jul 2003
    • 5344

    #1

    SQL question

    what is wrong with this sql?

    Code:
    update `customers` set payout=100 where id=('234', '34', '102');
    what i'm trying to do is set the payout to 100 to customers which ID is either 234, 34 or 102 in the shortest sql possible
    * Mainstream ? $65 per sale
    * new male contraception
  • WarChild
    Let slip the dogs of war.
    • Jan 2003
    • 17263

    #2
    Originally posted by Zester
    what is wrong with this sql?

    Code:
    update `customers` set payout=100 where id=('234', '34', '102');
    what i'm trying to do is set the payout to 100 to customers which ID is either 234, 34 or 102 in the shortest sql possible
    UPDATE customers
    SET payout = '100'
    WHERE id IN ('234', '34', '102');
    Last edited by WarChild; 07-06-2005, 01:47 AM.
    .

    Comment

    Working...