Click here to Skip to main content
14,644,614 members
Rate this:
Please Sign up or sign in to vote.
See more:
Recently I was asked this question in an Interview.
I beleive when you apply a primary key on a table and that would mean that you have applied a primary key constraint ?

So Definitely Both are same right ?

What I have tried:

Tried Googline, Nothing found specific
Posted
Updated 5-Feb-20 22:22pm

1 solution

Rate this:
Please Sign up or sign in to vote.

Solution 1

There is almost no difference. In the case where you explicitly state constraint you can name it however you want. Defining just primary key gets you automatic name (depending on the database).
   

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100