Share via

What should the Data Type and length be on a GUID ID?

Bobby P 271 Reputation points
2023-03-23T14:12:17.9533333+00:00

So we are NOT creating a GUID...just storing a GUID in another Table. What should the Data Type be defined for storing a previously created GUID in a Table? For example...we want to capture those records that are Deleted and want to store the GUIDs of those deleted records into a [DeleteLog] Table. So we're not generating the GUID...just wanting to capture the GUID and store it.

Thanks in advance for your review and am hopeful for a reply.

SQL Server | Other

2 answers

Sort by: Most helpful
  1. Anonymous
    2023-03-24T02:20:40.77+00:00

    Hi @Bobby P

    You can refer to this thread. Maybe it can help you.

    https://stackoverflow.com/questions/968175/what-is-the-string-length-of-a-guid

    Best regards,

    Percy Tang


    If the answer is the right solution, please click "Accept Answer". If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our Documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

  2. Jingyang Li 5,901 Reputation points Volunteer Moderator
    2023-03-23T14:20:52.71+00:00

    uniqueidentifier

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.