Wrong Info about Primary Key?


#1

Hi, this is regarding "A table can not have more than one PRIMARY KEY column." mentioned in the course. This is a misleading and incorrect statement. There can be only one primary key, but there can be many columns within this PRIMARY KEY.

Or is SQLLite different?


#2

@corepro02688,
Maybe you could have a read
http://stackoverflow.com/questions/7126350/why-we-cant-have-more-than-one-primary-key


#3

Hi @leonhard.wettengmx.n

Thanks for the link. But that's exactly what I said in my statement. There can only be one primary key, but multiple columns in that key. Example, both cust_id and their ssn can be a part of the primary key.

However, the instructions say 'A table cannot have more than one PK column' column being the keyword. That is wrong.


#4

I agree with you on this point, the statement is misleading.