0 votes
1 view
in SQL by (21k points)

I know that you can ask ActiveRecord to list tables in the console using:


Is there a command that would list the columns in a given table?

1 Answer

0 votes
by (36.8k points)

The below code will list the column_names from a table:


e.g. User.column_names