Which GUID can I use as a placeholder

I have a database table that has an empty type column uniqueidentifier. It has been put in place for use in the near future. But for now, I need to use some kind of placeholder. Can i just use:

00000000-0000-0000-0000-000000000000

for all rows until the real guid is applied, when new rows are inserted in the future? Does SQL Server provide uniqueness in this column?

+3
source share
2 answers

SQL Server , IF . SQL Server , NOT NULL.

+7

marc_s, , / ( , ).

IF, , GUID (NOT NULL), , OK, GUID, , GUID.

, , , GUID, , NULL - . , , - NULL 0, , GUID , , .

? , NULL ( , 0, , ). , GUID .

+2
source

Source: https://habr.com/ru/post/1729693/


All Articles