Home > Backend Development > PHP Tutorial > javascript - mysql: show tables like 'img_cxl_' 怎么通过 as 将获取到的表的字段修改成简单的?

javascript - mysql: show tables like 'img_cxl_' 怎么通过 as 将获取到的表的字段修改成简单的?

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-06 20:18:59
Original
1782 people have browsed it

show tables like 'img_cxl';

查询后,获取结果如下:
javascript - mysql: show tables like 'img_cxl_' 怎么通过 as 将获取到的表的字段修改成简单的?

怎么将字段名:Tables_in_guanyucun (%img_cxl_%) 这个字段名改成简单的?
例如:
像这样的: select count() from user; 本来结果集中的字段名应该是:count()
然后修改成: select count(*) as length from user; 结果集的字段名就成了: length
更加简便。

求解决,谢谢

回复内容:

show tables like 'img_cxl';

查询后,获取结果如下:
javascript - mysql: show tables like 'img_cxl_' 怎么通过 as 将获取到的表的字段修改成简单的?

怎么将字段名:Tables_in_guanyucun (%img_cxl_%) 这个字段名改成简单的?
例如:
像这样的: select count() from user; 本来结果集中的字段名应该是:count()
然后修改成: select count(*) as length from user; 结果集的字段名就成了: length
更加简便。

求解决,谢谢

SHOW的参数里没有这东西
http://dev.mysql.com/doc/refman/5.7/en/show-tables.html

Related labels:
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Issues
php data acquisition?
From 1970-01-01 08:00:00
0
0
0
PHP extension intl
From 1970-01-01 08:00:00
0
0
0
How to learn php well
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template