首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > JAVA > J2EE开发 >

sql describe有关问题

2012-04-16 
sql describe问题我有几个表 table1,里面有N个字段 a1, a2, a3select * from table1但是现在由于业务需要

sql describe问题
我有几个表 table1,里面有N个字段 a1, a2, a3
select * from table1
但是现在由于业务需要
不能写select *
我想知道我怎么获取table1里面含有哪些字段,然后再自己拼凑

describe table table1这个是DB2命令行的
但是我SQL中怎么写 谢谢

[解决办法]
oracle方式
select column_name from all_tab_columns where table_name = upper( ' ');

sql server:

select name from SysColumns where id = Object_Id('TableName')
[解决办法]
楼主用db2吗

热点排行