UUID/GUID Datatype in Databricks SQL

avidex180899
New Contributor III

Hi all,

I am trying to create a table with a GUID column.

I have tried using GUID, UUID; but both of them are not working.

Can someone help me with the syntax for adding a GUID column?

Thanks!

Aviral-Bhardwaj
Esteemed Contributor III

Hey @Avinash Narasimhan​ ,

image.png 

What is the exact problem you are getting

can you please share it is working fine for me

Thanks

Aviral Bhardwaj

AviralBhardwaj

View solution in original post

Hi @Aviral Bhardwaj​ ,

My issue has been resolved. So I was supposed to make one of my columns as a UUID data type. But then I decided to make it as a STRING data type and insert uuid's directly from the code and I am currently using that approach.

Thanks for your input!

Aviral-Bhardwaj
Esteemed Contributor III

nice to know keep it up

AviralBhardwaj

rswarnkar5
New Contributor III

> What ANSI SQL data structure to use for UUID or GUID?

I had similar question. The answer was `STRING`.