在查看表结构的时候抛出:
ERROR:No query specified
root@localhost 17:45:36 sampdb> show create table animals\G;
*************************** 1. row ***************************
Table: animals
Create Table: CREATE TABLE `animals` (
`id` mediumint(9) NOT NULL AUTO_INCREMENT,
`name` char(30) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8
1 row in set (0.00 sec)
ERROR:
No query specified
出现这个错误是因为sql写法出现问题,导致抛出异常错误,在“\G” 后面不需要带“ ;” ,去掉“ ;”便不会抛出异常:
root@localhost 17:45:51 sampdb> show create table animals\G
*************************** 1. row ***************************
Table: animals
Create Table: CREATE TABLE `animals` (
`id` mediumint(9) NOT NULL AUTO_INCREMENT,
`name` char(30) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8
1 row in set (0.00 sec)
阅读(1774) | 评论(0) | 转发(0) |