Skip to main content
Wasteful complicated query. I made it simplest one according to the question.
Source Link
S.M.Mousavi
  • 5.3k
  • 7
  • 47
  • 64

I know it is an old thread, but recently I needed the same and found a neat way:

select t.tbl_name,SELECT c.name col_name from sqlite_master t,  FROM pragma_table_info(t.tbl_name'your_table_name') c where t.type = 'table';c; 

I know it is an old thread, but recently I needed the same and found a neat way:

select t.tbl_name, c.name col_name from sqlite_master t,   pragma_table_info(t.tbl_name) c where t.type = 'table'; 

I know it is an old thread, but recently I needed the same and found a neat way:

SELECT c.name FROM pragma_table_info('your_table_name') c; 
added 8 characters in body
Source Link
Dharman
  • 33.9k
  • 27
  • 106
  • 157

I know it is an old thread, but recently I needed the same and found a neat way:

select t.tbl_name, c.name col_name from sqlite_master t, pragma_table_info(t.tbl_name) c where t.type = 'table';

select t.tbl_name, c.name col_name from sqlite_master t, pragma_table_info(t.tbl_name) c where t.type = 'table'; 

I know it is an old thread, but recently I needed the same and found a neat way:

select t.tbl_name, c.name col_name from sqlite_master t, pragma_table_info(t.tbl_name) c where t.type = 'table';

I know it is an old thread, but recently I needed the same and found a neat way:

select t.tbl_name, c.name col_name from sqlite_master t, pragma_table_info(t.tbl_name) c where t.type = 'table'; 
Source Link

I know it is an old thread, but recently I needed the same and found a neat way:

select t.tbl_name, c.name col_name from sqlite_master t, pragma_table_info(t.tbl_name) c where t.type = 'table';