我不认为这样。
“SQL As Understood By SQLite”页不提及表格或列的注释,也不提供
CREATE TABLE或
ALTER TABLE文档。
原文链接:https://www.f2er.com/sqlite/197939.html另外,Unsupported SQL维基页面有:
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.
但是,sqlite会保留您在DDL中的sql注释。如果将其提供给sqlite3 CLI工具:
CREATE TABLE User -- A table comment ( uid INTEGER,-- A field comment flags INTEGER -- Another field comment );
然后你从.schema命令得到这些:
sqlite> .schema CREATE TABLE User -- A table comment ( uid INTEGER,-- A field comment flags INTEGER -- Another field comment );
因此,如果您可以控制用于创建表的DDL,则应该可以伪造它。