php + unixODBC + DB2 + DESCRIBE = token not valid?

后端 未结 4 1378
渐次进展
渐次进展 2021-01-16 11:04

Code I am trying to run:

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

The result:

PHP War

4条回答
  •  清歌不尽
    2021-01-16 11:36

    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'
    

提交回复
热议问题