Rowid in MySQL

Posted on 2011-04-30
Last Modified: 2012-05-11
Can I use rowid in MySQL like in Oracle???
Question by:verinsis
    LVL 82

    Expert Comment

    by:Dave Baldwin
    Apparently not.  Several posts on the MySQL forum say no.,368131,379277#msg-379277
    LVL 7

    Accepted Solution

    LVL 12

    Expert Comment

    by:Mohamed Abowarda
    There is no rowid in MySQL.

    The best thing you could do is to define a surrogate primary key with an auto_increment field, and use that to reference your row for subsequent updates.

    Author Comment

    A auto_increment field isn´t the solution because I need a key over all tables in database, not only over one table.
    LVL 142

    Expert Comment

    by:Guy Hengel [angelIII / a3]
    MySQL does not have rowid.
    if you need a "globally unique" id for any row, you could assign a GUID value to a dedicated column (but still would be your own code)
    however, given such a GUID, you cannot locate the row as such, as still you would need to know the table it would be in.

    you might want to explain the "global picture" about your requirement?

    Author Closing Comment


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Enabling OSINT in Activity Based Intelligence

    Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

    Deprecated and Headed for the Dustbin By now, you have probably heard that some PHP features, while convenient, can also cause PHP security problems.  This article discusses one of those, called register_globals.  It is a thing you do not want.  …
    These days socially coordinated efforts have turned into a critical requirement for enterprises.
    The viewer will learn how to dynamically set the form action using jQuery.
    The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

    759 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    9 Experts available now in Live!

    Get 1:1 Help Now