Navigation
- FAQ Home
- All categories
- About Webyog support and about this FAQ
- About the SQLyog program

- Connection issues

- Using the GUI
- Managing your MySQL Database Systems
- Database Schema Synchronization
- MySQL DATA synchronization
- SQL Scheduler and Reporting Tool
- Importing external data
- Backup/Restore
- SQLyog Job Agent (SJA)

- Working with Views, Stored Procedures and Triggers
- Character Set and Localization Issues
- MySQL bugs that affect SQLyog
- Questions on Open Source and Compiling
- Sitemap
Most popular FAQs 
- I get error 1130 "Host is not allowed to ... (169366 views)
- Error no. 2003: Can't connect... (86310 views)
- SQLyog Version History (63975 views)
- Error no. 1045: "Connection denied..." (61371 views)
- Error no. 1251: "Client does not support authentication..." (58326 views)
- Error No. 2005: Unknown MySQL server host... (50214 views)
- What is HTTP-tunneling? (42290 views)
- What Is SSH and SSH-tunneling? (38087 views)
- Can I use SQLyog with the WINE Windows emulator ... (34956 views)
- Why are Stored Procedures not created when I import ... (34273 views)
Latest FAQs 
- SQLyog Version History (2012-01-26 08:20)
- SQLyog is a client for the MySQL server - ... (2011-11-04 04:48)
- I get error 1130 "Host is not allowed to ... (2011-11-01 05:21)
- Problems on Ubuntu 11.x (2011-10-29 13:02)
- Problems creating a functional DSN on 64 bit Windows. ... (2011-09-15 14:34)
Sticky FAQs
Managing your MySQL Database Systems » Manipulating data.
Can I use the auto_increment attribute without using that column as a Primary Key.
Yes!
MySQL allows for that. The rules are:
- There can only be one auto_increment column in a table
- This column must be defined as a KEY
We introduced GUI support for this with SQLyog 5.2. You can now check the 'auto_increment' checkbox from the CREATE TABLE pane. SQLyog then issues a 'CREATE TABLE' statement that includes a definition/declaration of a UNIQUE KEY on that column.
Note that if you later remove the auto_increment attribute from that column the KEY remains in existence. We could drop the KEY, but we won't as we cannot be sure if it is needed for some other purpose. You will have to drop it from the 'Manage Indexes' window if you do not want it anymore. Maintaining indexes that are not used puts additional load on the server and may slow down operations on the table.
This is also the reason why we have not enabled the 'fully-automatic' creation of such autoincrement-field from ALTER TABLE. If a user 'moves' the autoincrement attribute from one column to another several times a corresponding number of KEYs would result. So the implementation with ALTER TABLE is done so that you will need first to create the KEY - and next you can assign the autoincrement attribute from ALTER TABLE.
Tags: -
Related entries:
- SQLyog Version History
- What is and what is not imported by the SQLyog Import External Data Tool?
- Can I perform "incremental import" with the SQLyog Import External Data Tool?
- Timestamp defined "ON UPDATE CURRENT_TIMESTAMP" updates incorrectly.
- I am able to connect but can't see the list of databases/tables.
Last update: 2006-09-16 13:17
Author: Peter Laursen
Revision: 1.0
You can comment this FAQ