Home  >  Article  >  Database  >  通过表名和字段名查询字段类型

通过表名和字段名查询字段类型

WBOY
WBOYOriginal
2016-06-07 16:06:411303browse

今天遇到了一个问题,就是要通过表名和字段名获取该字段的字段类型。网上找了好多方法,都不成功(本人的数据库方面的知识比较匮乏 )。后来,终于找到一个正确的语句,特此记录。 select data_type from user_tab_columns where table_name =表名 and colum

今天遇到了一个问题,就是要通过表名和字段名获取该字段的字段类型。网上找了好多方法,都不成功(本人的数据库方面的知识比较匮乏奋斗)。后来,终于找到一个正确的语句,特此记录。

    select data_type from user_tab_columns where table_name ='表名' and column_name ='字段名'


Statement:
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
Previous article:OCP47:155Next article:rac_grid自检提示缺少cvuqdisk包