Actually you have 2 problems:
- Unique random number
You can find answers here: Generate list of new unique random numbers in T-SQL
- convert regular (base10) number to Base36 ('0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ')
For 2 characters length you can use this code:
DECLARE @Base10ToBase36 AS TABLE (
ID TINYINT NOT NULL IDENTITY(0,1) PRIMARY KEY,
Symbol CHAR(1) NOT NULL CHECK(Symbol LIKE '[0-9,A-Z]')
)
INSERT INTO @Base10ToBase36(Symbol)
VALUES ('0'), ('1'), ('2'), ('3'), ('4'), ('5'), ('6'), ('7'), ('8'), ('9'),
('A'), ('B'), ('C'), ('D'), ('E'), ('F'), ('G'), ('H'), ('I'), ('J'),
('K'), ('L'), ('M'), ('N'), ('O'), ('P'), ('Q'), ('R'), ('S'), ('T'),
('U'), ('V'), ('W'), ('X'), ('Y'), ('Z')
SELECT TOP (1)
pos1.ID * 36 + pos0.ID AS Base10Number,
pos1.Symbol,
Pos0.Symbol,
CONCAT(pos1.Symbol, Pos0.Symbol) AS Base36
FROM @Base10ToBase36 AS pos0
CROSS JOIN @Base10ToBase36 AS pos1
ORDER BY NEWID() -- random
About random you can get more explanation here: Random record from a database table (T-SQL)
Regarding primary key - I'm totally agree with @TheImpaler. It's bad idea