Two tables with identical column names. First table has a primary key.

I have two tables which are identical. They are named differently but the column names and lengths are the same.
The difference between the two is that the second table "Table_Hash" has no primary key on the "ID" column.
Basically I am using Table_Hash as a table to hold values from "Table_First".

Is it okay that my table column in Table_Hash has a column named the same as Table_First "ID". No primary key is assigned in Table_Hash ?

-- Rough example :
Table_First
ID  Primary
CustomerName

-- Table hash is identical to Table_First but with no primary key asssigned to "ID"
Table_Hash
ID
CustomerName
LVL 2
brgdotnetcontractorAsked:
Who is Participating?
 
sdstuberCommented:
It's ok in that it's legal syntax to do so.  You'll get no errors.  Easiest way to verify and is to simply try it.

It may or may not be ok to implement such a solution.  
Why no PK?  Do you want to allow nulls in that column and/or duplicate values?
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.