1

I've searched for this thingy a lot.. and I can not find a solution since I'm beginner in SQL itself.

I used to edit games database. now, I need to create a new table with 1 row called "CodeName128" and it should contain the same value many times.. when I place something like

CODE_NAME1
CODE_NAME1

it tells me No rows was updated blabla which means this table already have this code.

how can I get over it and enable the duplication in table?

Live example: enter image description here

4
  • remove the unique key from that column. Commented Sep 17, 2013 at 14:01
  • You have a primary key constraint on the column. A primary key enforces uniqueness on values. Commented Sep 17, 2013 at 14:03
  • Use a unique key instead of one already in the db so SQL server can see it's a new row Commented Sep 17, 2013 at 14:05
  • Thanks guys. worked :3 Commented Sep 17, 2013 at 14:54

1 Answer 1

1

You must be having Primary key or Unique key defined on that column which is not allowing you to enter the duplicate values. The keys must be defined for a reason, so its not advisable to remove those, still if you think that duplicate values are required for that column, you have to alter the table structure and remove those constraints from that column.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.