SQLite Forum

sql column in sqlite_master
Login

sql column in sqlite_master

(1) By curmudgeon on 2020-04-10 11:13:36 [link] [source]

The sql column generally shows tables and columns inside square brackets but the odd table name (/ column name?) is inside quotation marks instead. Is there a reason for this as none of the table names in question are keywords?

(2) By David Raymond (dvdraymond) on 2020-04-10 12:43:07 in reply to 1 [source]

The sql field normally has the CREATE statement as-is from when it was run with just the opening keywords capitalized. But if you use ALTER TABLE to rename a table or field it will always put the new name in quotes no matter how simple the new name is. (If I'm remembering correctly)

As to why? Ehh, better safe than sorry? <shrugs>

(3.2) By curmudgeon on 2020-04-10 14:37:02 edited from 3.1 in reply to 2 [link] [source]

You're right David. What I'm seeing is a result of my sql being altered by SQLite Export Pro. Thanks.

PS For future reference. I tried 'ALTER TABLE ADD COLUMN'. SQLite didn't put the added column in quotes.