Вопрос

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 ?

Это было полезно?

Решение

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

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top