Sponsored Content
Top Forums Programming MySQL auto_increment, primary key Post 302590482 by Corona688 on Monday 16th of January 2012 11:22:34 AM
Old 01-16-2012
Quote:
Originally Posted by yifangt
I added this column, but there is always problem with loading the local file. Somehow the columns are shifted.
Shifted in what way? What rows were you expecting, and what rows do you get?

auto-increment is generally used for new data, since the automatic increment is difficult to reset -- it's not supposed to be anything but a unique number specific to one table. Setting the number yourself is not a good idea either, it may lead to problems inserting later.
 

6 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Pressing backspace key simulates enter key

Hi, Whenever i press the backspace key, a new line appears, i.e. it works like a enter key. :confused: Thanks (2 Replies)
Discussion started by: vibhor_agarwali
2 Replies

2. Web Development

MySQL Replication Issues: Duplicate Key Error

Lately my attention has been focused on distributed MySQL database replication to other web servers. All was going well, but then I noticed the replication would stop and there were there "Duplicate Primary Key" errors in SHOW SLAVE STATUS; I started to trace these down and noticed that this... (2 Replies)
Discussion started by: Neo
2 Replies

3. Solaris

Solaris 8 ssh public key authentication issue - Server refused our key

Hi, I've used the following way to set ssh public key authentication and it is working fine on Solaris 10, RedHat Linux and SuSE Linux servers without any problem. But I got error 'Server refused our key' on Solaris 8 system. Solaris 8 uses SSH2 too. Why? Please help. Thanks. ... (1 Reply)
Discussion started by: aixlover
1 Replies

4. UNIX and Linux Applications

MySQL Daemon failed to start - no mysql.sock file

After doing a yum install mysql mysql-server on Fedora 14 I wasn't able to fully install the packages correctly. It installed MySQL 5.1. I was getting the following error when running the: mysql ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)... (3 Replies)
Discussion started by: jastanle84
3 Replies

5. Programming

Identifying a missing primary key

I have the following method to identify missing primary keys in a MySQL database schema: USE information_schema; SELECT xx.table_name FROM (SELECT table_name, COUNT(*) FROM columns WHERE table_schema = @myDB GROUP BY table_name, column_key) xx GROUP BY xx.table_name HAVING COUNT(*) = 1; I... (0 Replies)
Discussion started by: figaro
0 Replies

6. Solaris

Primary key issue when running Oracle sql file

I got a issue with running the following script below if I remove the inserts and alter table the tables will install just fine but if I try and do the full thing in one go i get the below error dose any one have any ideas on this problem? its got me spinning, thanks. REM REM List of... (1 Reply)
Discussion started by: Wpgn
1 Replies
ODBC_FOREIGNKEYS(3)							 1						       ODBC_FOREIGNKEYS(3)

odbc_foreignkeys - Retrieves a list of foreign keys

SYNOPSIS
resource odbc_foreignkeys (resource $connection_id, string $pk_qualifier, string $pk_owner, string $pk_table, string $fk_qualifier, string $fk_owner, string $fk_table) DESCRIPTION
Retrieves a list of foreign keys in the specified table or a list of foreign keys in other tables that refer to the primary key in the specified table PARAMETERS
o $connection_id -The ODBC connection identifier, see odbc_connect(3) for details. o $pk_qualifier - The primary key qualifier. o $pk_owner - The primary key owner. o $pk_table - The primary key table. o $fk_qualifier - The foreign key qualifier. o $fk_owner - The foreign key owner. o $fk_table - The foreign key table. RETURN VALUES
Returns an ODBC result identifier or FALSE on failure. The result set has the following columns: oPKTABLE_QUALIFIER oPKTABLE_OWNER oPKTABLE_NAME oPKCOLUMN_NAME oFKTABLE_QUALIFIER oFKTABLE_OWNER oFKTABLE_NAME oFKCOLUMN_NAME oKEY_SEQ oUPDATE_RULE oDELETE_RULE oFK_NAME oPK_NAME If $pk_table contains a table name, odbc_foreignkeys(3) returns a result set containing the primary key of the specified table and all of the foreign keys that refer to it. If $fk_table contains a table name, odbc_foreignkeys(3) returns a result set containing all of the foreign keys in the specified table and the primary keys (in other tables) to which they refer. If both $pk_table and $fk_table contain table names, odbc_foreignkeys(3) returns the foreign keys in the table specified in $fk_table that refer to the primary key of the table specified in $pk_table. This should be one key at most. PHP Documentation Group ODBC_FOREIGNKEYS(3)
All times are GMT -4. The time now is 02:35 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy