Unsupported Screen Size: The viewport size is too small for the theme to render properly.

Insert/Update is read only

forums forums SQLyog Using SQLyog Insert/Update is read only

  • This topic is empty.
Viewing 2 reply threads
  • Author
    Posts
    • #8416
      saturn
      Member

      I have several database tables within one MySQL database that have no primary key assigned. When I try to edit the data in these tables (which are not linked to any other tables), I cannot because the program tells me “Insert/Update is read only as no Primary Key is defined”.

      How do I get around this feature? phpMyAdmin does not have this restriction.

      Thank you.

      Allen

    • #15744
      CalEvans
      Member

      Don't take this the wrong way.

      The absolute best way to get around this problem is to create primary keys on all of your tables.

      SQLYog provides a nice front end for you to edit but on the back end it's simply issuing UPDATE statements. To issue an update, SQLYog HAS to have a way of identifying the exact record you want to update. Without a primary or a candidate (UNIQUE) key, there is no way to do this.

      phpMyAdmin is a toy for those who don't know how to use better tools. (IMHO) Yes, it allows you to do this…and yes, if you have 2 records exactly the same, it will update them both when you edit one. Nature of the beast.

      HTH,

      =C=

    • #15745
      Shadow
      Member

      You may issue the INSERT/UPDATE statements in the SQL window. SQLyog is capable of generating a backbone for these statements. The GUI – correctly – does not support this feature.

Viewing 2 reply threads
  • You must be logged in to reply to this topic.