SQL Interview: 5: System defined primary key names
This is a post in the SQL Interview series. These aren’t trick or gotcha questions, they’re just questions designed to scope out a candidate’s knowledge around SQL Server and Azure SQL Database.
Section: Development Level: Intro
Question:
If you create a table using the following code, what would the name of the primary key constraint look like?
CREATE TABLE Sales.CustomerGroups
(
CustomerGroupID int IDENTITY(1, 1) PRIMARY KEY,
CustomerGroupName nvarchar(50) NOT NULL
);
How could you specify the name?
2021-04-01