I need to know if i can set a bigint column as primary key?
11 Answer
You can use BIGINT as a primary key but with some penalties.
BIGINT takes up more space on disk storage than INT and using BIGINT as a primary key (or any index) will add size to the index, perhaps as much as doubling it.
This can have a performance impact on searching the index and make it slower to run queries.
I would suggest that unless you have plans to insert more than 2.1 Billion rows into one table you should just use INT. Otherwise you will loose perfomance.
If you plan to do more that 2.1 billion inserts into one table you will have to do a fair bit more research than asking on SuperUser.com.
1