UPDATE "table" SET age=55 WHERE name='Pete' and surname='McKensey' and age=44 If you now try to update the third record's age to 55 the following statement will be sent to the server: Now there will be two records in the table with a Pete McKensey age 44 record. This would execute correctly and change the first record's age value. UPDATE "table" SET age=44 WHERE name='Pete' and surname='McKensey' and age=24 If you update Pete's age to 44 the following statement would be issued to the server : Navicat warns you of this because when updating a table that does not have a primary key you may get unexpected results. MacOS 12 or above: Select Navicat xxx > Preferences and uncheck the Warn if no primary keys found in table in the General tab. MacOS 8.x - 11.2: Select Navicat xxx > Preferences and uncheck the Show primary key warning in the Grids tab. Windows and Linux: Select Tools > Options and uncheck the Show primary key warning in Appearance > Data & Grid. What's this warning about my table not having a primary key?Īpply Navicat Product: Navicat for MySQL, Navicat for PostgreSQL, Navicat for Oracle, Navicat for SQL Server, Navicat for SQLite, Navicat for MariaDB, Navicat PremiumĪpply Navicat Version No.: Windows version 10.x or below, macOS version 8.x or above, Linux version 10.x or belowįirst of all, if the warning annoys you, it can be turned off!
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |