Thread: GOT error #1064

    #1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2013
    Posts
    1
    Rep Power
    0

    GOT error #1064


    #1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'where Job_id='33' and Sk_id='2'' at line 1

    my query is
    insert into tbl_jobskill(Sk_id,Job_id)values('1','33') ON DUPLICATE KEY UPDATE Sk_id='1',Job_id='33' where Job_id='33' and Sk_id='2'
  2. #2
  3. SQL Consultant
    Devshed Supreme Being (6500+ posts)

    Join Date
    Feb 2003
    Location
    Toronto Canada
    Posts
    27,145
    Rep Power
    4274
    INSERT statement does not allow a WHERE clause

    what are you trying to do?
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

IMN logo majestic logo threadwatch logo seochat tools logo