sql:
SELECT Name from SysColumns WHERE id=Object_Id(tablename) order by colorder
select name from syscolumns where id=(select max(id) from sysobjects where xtype='u' and name='CB_ShipBasic')
--读取库中的所有表名
select name from sysobjects where xtype='u'
oracle:
select A.COLUMN_NAME
,A.TABLE_NAME, ROWNUM AS ROWNO
from USER_TAB_COLUMNS A
where TABLE_NAME = 'tablename'
ORDER BY A.COLUMN_ID

本文将介绍如何使用SQL和Oracle数据库进行高效的数据查询,包括获取表名、表信息及特定表的列名等操作。
2454

被折叠的 条评论
为什么被折叠?



