Solved

Incremental Primary Key on CSV import

Posted on 2008-10-02
2
385 Views
Last Modified: 2013-11-24
Is it possible when importing via CSV in SQLyog to add lines with the same value for the Primary Key.
trying to add records to an existing database and some of the existing records have the same Primary Key value as some of the ones i am importing.

0
Comment
Question by:7softsteve
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 7

Expert Comment

by:mattaob
ID: 22623669
Primary key's are unique so you won't be able to add more than 1 column with the same primary key
0
 
LVL 20

Accepted Solution

by:
ElrondCT earned 500 total points
ID: 22629003
The whole point of a primary key is that it is unique, so there is some way to identify each record. If the field you're using needs to have duplicates, then you should create another field to use as the primary key, perhaps simply an auto-incrementing number. You don't have to have the database sorted for display by the primary key.
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Does the idea of dealing with bits scare or confuse you? Does it seem like a waste of time in an age where we all have terabytes of storage? If so, you're missing out on one of the core tools in every professional programmer's toolbox. Learn how to …
Deploying a Microsoft Access application in a Citrix environment is not difficult but takes a few steps. However, Citrix system people are often of little help, as they typically know next to nothing about Access. The script provided here will take …
The viewer will learn how to simulate a series of sales calls dependent on a single skill level and learn how to simulate a series of sales calls dependent on two skill levels. Simulating Independent Sales Calls: Enter .75 into cell C2 – “skill leve…
The viewer will learn how to create two correlated normally distributed random variables in Excel, use a normal distribution to simulate the return on different levels of investment in each of the two funds over a period of ten years, and, create a …

739 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question