Results 1 to 3 of 3

Thread: MySQL question

  1. #1
    Join Date
    Aug 2003
    Posts
    328

    Unanswered: MySQL question

    I have never used MySQL but am guessing it is not like SQL for Oracle. My query says this:
    update work_order
    set row_num=(select max(row_num)+1 from work_order)
    where row_num=5
    and I am getting an error. Anyone know why?
    Or maybe someone has an idea of how I can make a rownum in my table?
    Thanks
    Last edited by exdter; 03-09-04 at 12:59.

  2. #2
    Join Date
    Oct 2003
    Location
    Denver, Colorado
    Posts
    137

    Re: MySQL question

    Your MySQL version does not support subqueries. You should use the MySQL REPLACE if you have a unique index on your table.
    http://www.mysql.com/doc/en/REPLACE.html

  3. #3
    Join Date
    Aug 2003
    Posts
    328

    Re: MySQL question

    Got it working. Thanks.

Posting Permissions

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