sql查看一张表中某个字段是否存在??怎么写啊

2025-04-17 08:48:16
推荐回答(4个)
回答(1):

select * from user_tab_columns t where t.table_name=表名 and t.column_name =字段;
字段和表名都是大写哦

回答(2):

select * from table where column is not null

回答(3):

什么数据库,,,
sqlserver如下:

select 1
from sysobjects t1 inner join syscolumns t2 on t1.id=t2.id
where t1.name='表名'
and t1.xtype='u'
and t2.name=‘列明’

有数据就有

回答(4):

select * from 表名 where=‘条件(字段)’