本文介绍了php + unixODBC + DB2 + DESCRIBE =令牌无效?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

代码我试图运行:

$query = "DESCRIBE TABLE TABLENAME";
$result = odbc_exec($h, $query);

结果:

SELECT没有其他问题,在同一连接上执行INSERT,UPDATE或DELETE查询。这是一个语法错误吗?

There were no other problems with SELECT, INSERT, UPDATE or DELETE queries on the same connection. Is this a syntax error?

推荐答案

DB2的iSeries风格不支持SQL DESCRIBE语句。相反,您必须查询系统表:

The iSeries flavor of DB2 does not support the SQL DESCRIBE statement. Instead, you have to query the system table:

select * from qsys2.columns where table_schema = 'my_schema' and table_name = 'my_table'

这篇关于php + unixODBC + DB2 + DESCRIBE =令牌无效?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-11 20:39