-3

How to list all columns using SQL query?

iBala
  • 165
  • 1
  • 1
  • 8

1 Answers1

1
select column_name, data_type, character_maximum_length
    from INFORMATION_SCHEMA.COLUMNS 
    where table_name = '**table_name**';
Squirrel
  • 21,215
  • 4
  • 34
  • 31
iBala
  • 165
  • 1
  • 1
  • 8
  • You might want to explain what the code does. Code only answers are rarely useful to future readers. – BDL Mar 25 '21 at 09:33