Sql-server – SQL identity column with unique code column

sql servertable

This seems a simple question but is it still necessary to include a primary key with identity even if my columns are only a unique code and its description?

CREATE TABLE table1 (
      column1 INT NOT NULL IDENTITY, 
      column2 CHAR(4) NOT NULL,
      column3 VARCHAR(10) NULL 
      CONSTRAINT pk_id PRIMARY KEY (column1),
      CONSTRAINT uq_column2 UNIQUE (column2)
)  

Sample values:

INSERT INTO table1 VALUES ('A', 'aaa')
INSERT INTO table1 VALUES ('B', 'bbb')

Best Answer

If your column2 is immutable then it can serve as primary key. Only if it was to hold long values then you could consider to create a separate primary key field to save space in the tables that have a foreign key constraint with this table.