I wish to generate unique hexadecimal amounts in SQL. How do i do that?

Knowing how you can generate in c# please likewise incorporate that.

In SQL Server: newid()

In C#: System.Guid.NewGuid()

These enable you to get GUID's, that are unique, hexidecimal amounts however, they generally have dashes (-) in the center of them, so you might want to perform a little bit of string parsing to obtain what you would like. Apart from that, though, this will meet your needs.

SQL Server:

SELECT  NEWID()

Oracle:

SELECT  SYS_GUID()
FROM    dual

MySQL:

SELECT  UUID()

In PostgreSQL, you will need to make use of an exterior function, although it has UUID type.

You could utilize an integer IDENTITY column after which a conver that to hex using

CONVERT(varbinary(8), MyTable.MyId)