Does Sqlite support adding comments to tables and columns?
In addition, the Unsupported SQL wiki page has:
2009-08-04: Table and column comments – I have scoured the doco and can’t find anything about applying comments to tables or their columns.
Yes, this is a 2009 wiki page, but other documents support the comment.
However, SQLite will retain your SQL comments in DDL. If you provide it to the sqlite3 CLI tool:
CREATE TABLE User
- A table comment
(
uid INTEGER, - A field comment
flags INTEGER - Another field comment
);
Then you get these from the .schema command:
sqlite > .schemaCREATE TABLE User
- A table comment
(
uid INTEGER, - A field comment
flags INTEGER - Another field comment
); pre>So if you can control the DDL used to create the table, you should be able to fake it.
In MySQL Workbench, you can add comments to the tables and columns in the MySQL database.
Does Sqlite support adding comments to tables and columns?
I don’t think so. The "SQL As Understood By SQLite" page does not mention table or column comments, nor does it provide CREATE TABLE or ALTER TABLE documentation.
In addition, the Unsupported SQL wiki page has:
2009-08-04: Table and column comments – I have scoured the doco and can't find anything about applying comments to tables or their columns.
Yes, this is a 2009 wiki page, but other documents support the comment.
However, SQLite will retain your SQL comments in DDL. If you provide it to the sqlite3 CLI tool:
CREATE TABLE User
- A table comment
(
uid INTEGER, - A field comment
flags INTEGER - Another field comment
);
Then you get these from the .schema command:
sqlite > .schemaCREATE TABLE User
- A table comment
(
uid INTEGER, - A field comment
flags INTEGER - Another field comment
); pre>So if you can control the DDL used to create the table, you should be able to fake it.