1

Suppose

SELECT * FROM some_tbl;

is same as

SELECT col1, col2, col3 FROM some_tbl;

Then how can I get the data from some_tbl without column name?

The problem is I don't know the column names...

Even I can't use information_schema in security reason...

Somebody said to me

You can get data without specific column name.

But I have any idea about it.

Ch3rry Kim
  • 11
  • 3

2 Answers2

1

Not sure if this is what you're after, but

SELECT * FROM some_tbl LIMIT 0;

will produce an empty result set containing the names of all the columns. Most decent APIs will allow you to access these column names from the result set.

Darwin von Corax
  • 5,201
  • 3
  • 17
  • 28
0

Is this what you're looking for:

Select * from syscolumns where ID in 
(Select ID from sysobjects where name = 'some_tbl')
glitzsfa
  • 353
  • 1
  • 2
  • 14