Query the first column of more than 3 data! (I don't know the column name of the first column)

zhaozj2021-02-12  174

Select * from test where first column> 3

Solution:

Select [name] from syscolumns where id = Object_id ('TableName') And color = 1

oral

Declare @fdname sysnameselect @ fdname = name from syscolumns where id = Object_id ('test') And color = 1exec ('select * from test where [' @ fdname ']> 3')

转载请注明原文地址:https://www.9cbs.com/read-6327.html

New Post(0)