如何获取表架构信息? [英] How to get Table schema information ?

查看:51
本文介绍了如何获取表架构信息?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们如何在MYSQL 5.1.34中获取表模式信息?


就像我们在ORACLE中使用它一样:


OCIDescribeAny()// //获取要描述的表的describe句柄。

OCIAttrGet()//获取参数句柄


OCIAttrGet()////获取表格中的列数

How can we get the table schema information in MYSQL 5.1.34?

Like we use in ORACLE to get it as:

OCIDescribeAny() // //get the describe handle for the table to be described.

OCIAttrGet() // to get parameter handle

OCIAttrGet() ////get the number of columns in the table

推荐答案

嗨。


嗯,始终有 INFORMATION_SCHEMA 数据库。

您可以在那里搜索有关数据库的每个细节。


然后有 SHOW 命令和其他各种实用程序语句


这就是你的意思是的oking for?
Hi.

Well, there is always the INFORMATION_SCHEMA database.
You can search for every detail about your databases there.

Then there is the SHOW command and various other Utility Statements.

Is that what you are looking for?


谢谢。我从INFORMATION_SCHEMA COLUMNS获得了信息。


从查询结果中检索数据时我面临以下问题。
Thanks. I got the information from INFORMATION_SCHEMA COLUMNS.

While retrieving the data from the result of query I faced following problem.
展开 | 选择 | Wrap | 行号


我认为你混淆旧的 MySQL(mysql)使用新的改进的MySQL(mysqli)扩展程序进行扩展。

函数 mysqli_real_query 属于后者。


注意i在mysql之后在函数名称中。

属于Improved MySQL扩展的所有函数也具有尾随的i。在函数名称中。


这是应该如何使用这些函数:
I think you are confusing the old MySQL (mysql) extension with the new Improved MySQL (mysqli) extension.

The function mysqli_real_query belongs to the latter.

Note the "i" following the "mysql" in the function name.
All the functions belonging to the Improved MySQL extension also have the trailing "i" in the function name.

This is how these function should be used:
展开 | < span class =codeLinkonclick =selectAll(this);>选择 | Wrap | 行号


这篇关于如何获取表架构信息?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆