mysql中select column_name from Information_schema.columns where table_Name = 'test'出现多个字段的问题
来源:互联网 发布:centos安装h.264 编辑:程序博客网 时间:2024/04/29 13:49
在mysql中,通过sql查询某个表字段时,会出现一些这个表中没有的字段
例:
select column_name from Information_schema.columns where table_Name = 'test';
因为这个表在其它库中也存在了,所以会出现多余的字段。
解决办法:
select column_name from Information_schema.columns where table_Name = 'test'and TABLE_SCHEMA='dbname';
指定当前数据数据库就可以了(dbname为我当前数据库名)。
0 0
- mysql中select column_name from Information_schema.columns where table_Name = 'test'出现多个字段的问题
- select count(column_name) form table_name or select count(*) from table_Name
- SELECT * FROM information_schema.columns
- select table_name from all_tables where owner='ofbiz';
- 有多少行? SELECT rows FROM sysindexes WHERE id = OBJECT_ID('table_name') AND indid < 2
- MySQL中select filed from table where field in (....)语句的排序问题
- MySQL INFORMATION_SCHEMA -- COLUMNS Table
- select * from table_name for update; 和 select t.*, t.rowid from table_name t的区别
- oracle 中 create table tb_content_bak as select * from tb_content where 1=2 long字段解决办法
- mysql中列信息查询(information_schema.columns )
- mysql之select from where
- why 'select 1 from table_name'
- select rownum num from( select * from test order by num) where rownum<=5
- mysql存储过程中使用select count(*) into 变量名 from +表+ where条件的用法
- 【整理】mysql中information_schema.tables字段说明
- SQL的 SELECT 字段 FROM 表 WHERE 某字段 Like 条件
- MySQL中修改多个数据表的字段拼接问题
- SELECT 字段 FROM 表 WHERE 某字段 Like 条件
- 腾讯云、阿里云上搭建JAVA、MariaDB、Tomcat环境
- linux的netlink接口详解(上)
- android 动态切换view
- malloc和new的区别
- 如何实现两个字符串的交叉合并功能java实现
- mysql中select column_name from Information_schema.columns where table_Name = 'test'出现多个字段的问题
- 蓝桥杯第六届 第10题 生命之树
- 数据链路层的三个基本问题:封装成帧 透明传输 差错检测
- mysql数据类型以及长度
- 初始化
- java 验证手机号
- 李刚《轻量级JavaEE企业应用实战Struts2Spring3Hibernate整合开发》笔记
- extern "C"的用法解析
- react-bits:条件渲染