問題描述
假設(shè)我有一個 int
字段,我將默認(rèn)值設(shè)置為 (0)
,這可行,但我見過有人這樣做((0))
,為什么?
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?
推薦答案
((0))
是它在目錄視圖中或在 SSMS 中生成腳本時的顯示方式.所以我認(rèn)為當(dāng)你看到它很可能是一個生成的腳本而不是從頭開始手寫的時候.
((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.
也就是說,(0)
、((0))
甚至 ((((((((((((0)))))))))))))
...假設(shè)我數(shù)對了,額外的括號不會改變意思,只是可讀性.
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.
這篇關(guān)于帶有兩組括號而不是一組括號的默認(rèn)值的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網(wǎng)!