sqlite> alter table T rename to X;
sqlite> .schema X
CREATE TABLE IF NOT EXISTS "X"(A integer);
A. Why does X needs to be escaped (" ") in the new table definition following the rename?
(Sure there is nothing wrong with that).
Though couldn't it follow the exact wording used in the rename to clause?
X if I write X and "X" if I write "X"?
To the extent that the rename could have to be refused (error return) in case of parsing issue due to the nature of the unquoted X.
B. The next question is not directly related to the rename to operation, but I spotted it when testing the rename to.
Why does "IF NOT EXISTS" is auto-added to the text of CREATE TABLE reported by the shell command .schema, when the table name was escaped in the original create statement?