MySQL5.5 数据库名.表名的问题

Alan S1 2011-09-06 09:07:09
为什么在MySQL新版本5.5里面,

在Command Line Client里面每次 select * from tableA都不允许了,
只能 select * from 数据库名.表名。
如何去掉前面的数据库名.前缀呢?
...全文
167 8 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
8 条回复
切换为时间正序
请发表友善的回复…
发表回复
ACMAIN_CHM 2011-09-07
  • 打赏
  • 举报
回复
ORDER 是保留字!

select * from `order`;
superhosts 2011-09-07
  • 打赏
  • 举报
回复
mysql5.5与mysql5.1有什么不同,能举出几列吗?要点
Alan S1 2011-09-07
  • 打赏
  • 举报
回复
mysql> use order_info
Database changed
mysql> select * from order;
ERROR 1064 (42000):
Alan S1 2011-09-07
  • 打赏
  • 举报
回复
使用了use dbname,先进了数据库,

结果还是要select * from order_info.order;
Alan S1 2011-09-07
  • 打赏
  • 举报
回复
Enter password: ********
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 122
Server version: 5.5.15 MySQL Community Server (GPL)

Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> use order_info
Database changed
mysql> select * from order;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that
corresponds to your MySQL server version for the right syntax to use near 'order
' at line 1
mysql>
rucypli 2011-09-06
  • 打赏
  • 举报
回复
use dbname先进数据库
xzg_sql 2011-09-06
  • 打赏
  • 举报
回复
应该如楼上所说
ACMAIN_CHM 2011-09-06
  • 打赏
  • 举报
回复
你有没有 use dbname ?

56,912

社区成员

发帖
与我相关
我的任务
社区描述
MySQL相关内容讨论专区
社区管理员
  • MySQL
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧