为什么方括号与表名一起出现? [英] Why do square bracket appear with the table name?

查看:105
本文介绍了为什么方括号与表名一起出现?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我创建了一个带有几个表的数据库,一些表名用方括号括起来:[table_name]



有没有人知道为什么会发生这种情况,当你使用SQL Server Management Studio脚本化你的对象时,它将用方括号括起所有的名字。



只有当名称包含空格或保留字(例如 [Name])时,才需要。


I created a database with couple of tables and some table names are enclosed with square bracket: [table_name]

Does anyone know why this happens, and how to get rid of it?

解决方案

When you use SQL Server Management Studio to script out your objects it will enclose all names with square brackets.

They are only necessary when the name contains a space or a reserved word (such as [Name]).

这篇关于为什么方括号与表名一起出现?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆