Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Default value with two sets of parentheses instead of one

Let's say I have an int field, and I set the default value as (0), which works, but I've seen people doing it like this instead ((0)),why?

like image 396
Control Freak Avatar asked Jul 07 '12 01:07

Control Freak


1 Answers

((0)) is how it will appear within the catalog views or if you generate a script in SSMS. So I think when you see that it's most likely a generated script and not hand-written that way from scratch.

That said, there is nothing different between (0), ((0)) or even (((((((((((((0))))))))))))) ... assuming I counted right, extra parentheses don't change the meaning, just readability.

like image 155
Aaron Bertrand Avatar answered Oct 11 '22 19:10

Aaron Bertrand