473,473 Members | 1,879 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Primary Key duplication in the primary key column

1 New Member
I have a table with id as a primary key. when we insert duplicate data using query it is showing an error that the primary key is violated. But when we directly enter the duplicate value into the table by editing the table it is accepting the duplicate values. Kindly give a me a solution regarding this.
Dec 31 '12 #1
1 1946
rski
700 Recognized Expert Contributor
No way. If column is defined as primary key it cannot contain duplicates. Please show us the table definition.
Dec 31 '12 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: mudge | last post by:
Hello, I have a mysql table. Two columns in the table are used to pull out stories from the table. One of the columns stands for categories of the stories, and the other column is the primary...
1
by: blanch | last post by:
Hi all, I'm pretty new to MySQL, but have some Access background. I've created a table for which I intended the email column to be the primary key, but didn't specify it at creation. Now, I'm...
2
by: me | last post by:
I would like to add an Identity to an existing column in a table using a stored procedure then add records to the table and then remove the identity after the records have been added or something...
4
by: Mavis Tilden | last post by:
Hi all, So I've been reading the newsgroups, and reading a few books trying to learn SQL and SQL Server 2000. The books tell me I need a Primary Key, and that every table should have one. I know...
3
by: Leon Shaw | last post by:
How do I get the primary key of a record just enter into the database? Then pass that same primary key ID column value to another table? Example: --- Members Table --- ---Transaction...
0
by: bvdrsganesh1981 | last post by:
Hi All There are 2 Tables: Tables are : Tbl1 ( 1col1,1col2,1col3,1col4) and Tbl2 ( 2col1,2col2,2col3) In Tbl1 (1col1,1col2,1col3 ) are composite primary key.So...
0
by: veg_all | last post by:
I think I figured out how to use array_multisort to sort by a primary index. But how can i make it sort by a secondary index?
4
by: =?Utf-8?B?QmFidU1hbg==?= | last post by:
Hi, I have a GridView and a SqlDataSource controls on a page. The SqlDataSource object uses stored procedures to do the CRUD operations. The DataSource has three columns one of which -...
0
by: diane | last post by:
Just trying to upsize using VFP 9 with SQL 2005 using VFP remote views. One in particular keeps coming up and saying Cannot insert the value NULL into column, when I really don't think I am...
2
by: Danny | last post by:
Hello, We imported a bunch of tables from a database and realized that the primary keys weren't copied to the destination db. In order to re- create the keys, we need to know which tables have...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.