列名不能包含字符' - ' [英] column name can't include character '-'

查看:101
本文介绍了列名不能包含字符' - '的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

为什么?

why?

推荐答案



" Niy" < NI *** @ hotmail.com>在留言中写道

news:55 ************************** @ posting.google.c om ...

|为什么?


这是规则


也,'' - ''对解析器有特殊意义
<然而,就像Access和VB使用[]分隔符一样,Oracle(我相信这是标准的ANSI SQL)使用"和/或
。分隔符允许''非法''列(和

其他对象)名称 - 但我不推荐这个


只使用_而不是 - 和oracle的生活会很好

; - {)mcs

"Niy" <ni***@hotmail.com> wrote in message
news:55**************************@posting.google.c om...
| why?

that''s the rules

also, ''-'' has special meaning to the parser

however, just like Access and VB use [] delimiters, Oracle (and I believe
this is standard ANSI SQL) uses "" delimiters to allow ''illegal'' column (and
other object) names -- but I wouldn''t recommend this

just use _ instead of -, and life with oracle will be just fine
;-{) mcs


如果你有一个带有列的故事
< br $>
a number

b number

ab number


将返回什么


从x中选择ab



IF you had a tale with columns

a number
b number
a-b number

what would return

select a-b from x

?


您的问题不明确,但看起来您需要做关于

表达式的研究 - 花一些时间阅读Oracle SQL Reference手册,并且

运行一些测试


你会发现表中的oracle不支持派生列

定义,但它在视图中支持


; - {mcs


x < x@x.hr>在消息新闻中写道:c1 ********** @ ls219.htnet.hr ...

|如果你有一个有栏目的故事

|

|一个数字

| b号

| a-b号码

|

|什么会回来

|

|从x中选择a-b
|

| ?

|

|
your question is not clear, but it looks like you need to do research on
expressions -- take some time reading the Oracle SQL Reference manual, and
running some tests

you will find that oracle does not support derived columns in table
definitions, but it does in views

;-{ mcs

"x" <x@x.hr> wrote in message news:c1**********@ls219.htnet.hr...
| IF you had a tale with columns
|
| a number
| b number
| a-b number
|
| what would return
|
| select a-b from x
|
| ?
|
|


这篇关于列名不能包含字符' - '的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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