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 ?

Était-ce utile?

La 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

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top