Let’s say I had a huge database, and I didn’t know the names of any column. Is there a way to select only the columns?
You can do a .schema to find out the names of the columns, and well, the rest of the schema.
I should have asked this yesterday… but is the correct syntax for getting the schema? I found it on StackOverflow.
SELECT * FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME='table_name';
If you’re doing it on codecademy you can do this:
SELECT * FROM sqlite_master;
If you have a file open in sqlite3 you can just type