Question

I have 3 types of access tokens that I need to store to SQL Server database : Google Access token, FB token, and my custom token which is GUID.

I wanted to put all 3 in same database column. If I choose datatype uniqueidentifier I cannot save for example google token in that column. Which datatype to choose to store all 3 token types ?

Was it helpful?

Solution

If the type are really different use a regular NVARCHAR.

The casting will be tricky but its the only way if you want to store them in the same column

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top