带有两组括号而不是一组括号的默认值

Default value with two sets of parentheses instead of one(带有两组括号而不是一组括号的默认值)
本文介绍了带有两组括号而不是一组括号的默认值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

问题描述

假设我有一个 int 字段,我将默认值设置为 (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 中生成脚本时的显示方式.所以我认为当你看到它很可能是一个生成的脚本而不是从头开始手写的时候.

((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))))))))))))) ...假设我数对了,额外的括号不会改变意思,只是可读性.

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.

这篇关于带有两组括号而不是一组括号的默认值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

本站部分内容来源互联网,如果有图片或者内容侵犯您的权益请联系我们删除!

相关文档推荐

Number of working days between two dates(两个日期之间的工作日数)
How do I use dateadd to get the first day of last year?(如何使用 dateadd 获取去年的第一天?)
SQL- Count occurrences of a specific word within all stored procedures(SQL- 计算所有存储过程中特定单词的出现次数)
SQL query to make a column of numbers a string(使一列数字成为字符串的 SQL 查询)
T-SQL: Best way to replace NULL with most recent non-null value?(T-SQL:用最新的非空值替换 NULL 的最佳方法?)
Count days in date range with set of exclusions which may overlap(使用一组可能重叠的排除项计算日期范围内的天数)