sql引用标识符

在Sql语句中,引用标识符主要是用于为数据库表明,字段名,索引名称的定义。常规标识符,不包含空格,不包含特殊字符。在引用时可直接使用,如果想在标识符定义中报刊空格等特殊字符,需要特殊处理。

MySql中,使用‘’,来处理特殊标识符。例如

create table Student{

  ID bigint not null,

  'Student Name' varchar(20)

}

在Sqlserver中使用[]来处理特殊标识符

create table Student{

  ID bigint not null,

  [Student Name] varchar(20)

}

posted @ 2012-10-15 11:00  黎明露珠  阅读(524)  评论(0编辑  收藏  举报