I tried your example. '.schema' and '.fullschema' do show the problem you describe.
However, for me, '.dump' worked correctly placing the semicolon on a line by itself right after the comment. ----- Original Message ----- From: "sqlite-mail" <sqlite-m...@dev.dadbiz.es> To: <sqlite-users at mailinglists.sqlite.org> Sent: Wednesday, August 12, 2015 1:14 AM Subject: [sqlite] Small bug in ".dump", ".schema" and ".fullschema" > Hello ! > > Working with sqlite3 I noticed that sqlite3 ".dump", ".schema" and > ".fullschema" outputs the contents of the field "sql" stored in > "sqlite_master" and if the sql statement ends with a comment the resulted > dump will be invalid see example: > > CREATE VIEW "event_event_ticket_list_view" AS > SELECT a."id", a."name", a."price", a."deadline", a."seats_max", > a."product_id", a."event_id" > FROM "event_event_ticket" AS a > --LEFT JOIN "product_product" AS b ON a."product_id" = b."id"; <<<<<<<<< > here is the problem