sqlite schema has quotes around table name after a table rename

766 views Asked by At

I had to rename an existing table in my sqlite database using the following command:

ALTER TABLE users RENAME TO widgets;

After running that command, when I check the schemas using the .schema command, this is what I see:

CREATE TABLE "widgets"(id integer primary key AUTOINCREMENT, widget_tag varchar(10), destination varchar(100), class varchar(10), name varchar(255), grp active bit(1));
CREATE TABLE uu(id integer primary key AUTOINCREMENT, uu_name varchar(255), email varchar(255), active bit(1));

Notice the quotes around the table name. I'm not sure if that's a bad thing or not. My web application runs just fine and I'm able to update / delete / select records no problem.

Can someone tell me what these quotes are and if I need to worry ? Thanks.

1

There are 1 answers

0
Jonathan Ochs On BEST ANSWER

As far as I am aware, you have nothing to worry about. The quotes simply define the name of the table as a string literal to SQLite. You would only need to worry if the value came back with the double quotes in "widgets" escaped, which you would have seen in your schema check as ""widgets"".