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

Deleting Data From Table Error

forums forums SQLyog SQLyog: Bugs / Feature Requests Deleting Data From Table Error

  • This topic is empty.
Viewing 1 reply thread
  • Author
    Posts
    • #11579
      Mirel Stoica
      Member

      presuming we have a table called test(test1 varchar, test2 varchar)

      data:

      1,2

      2,3

      3,4

      4,5

      5,6

      if I insert data twice:

      1,2

      2,3

      3,4

      4,5

      5,6

      1,2

      2,3

      3,4

      4,5

      5,6

      when I select … first record (1,2) and I delete it using delete button (Delete selected row(s))

      the record 1 is deleted of course … and also record nr 6 (1,2)

      the same thing happends for all records

      thank you

      Mirel

    • #29310
      peterlaursen
      Participant

      You should have a primary key in the table!

      Please read: http://www.webyog.com/faq/content/28/70/en…tabase-why.html

      (this FAQ describes UPDATE statements, but DELETE statments are exactly the same).

      Dublicate rows is a mess and a Primary Key in the table would avoid the situation to appear. But does not SQLyog prompt a warning dialogue for you?

Viewing 1 reply thread
  • You must be logged in to reply to this topic.