这条sql语句为什么会出错(10分)

  • 主题发起人 devexpress
  • 开始时间
D

devexpress

Unregistered / Unconfirmed
GUEST, unregistred user!
select jhdb.jhdh from jhdb A //出错

Server: Msg 107, Level 16, State 3, Line 1
The column prefix 'jhdb' does not match with a table name or alias name used in the query.

select * from jhdb A //不会出错
 
select A.jhdh from jhdb A 就可以了
 
应该写成这样呀:
select A.jhdh from jhdb A
 
jhdb已经指定别名A了,就必须用别名A或者只用jhdh不加表名也可以。
 
select jhdh from jhdb 这么写也行
 
顶部