I made a table in SQLiteStudio in DDL:
CREATE TABLE "City "
(
Name STRING,
Population INTEGER,
Country STRING,
Elevation INTEGER
);
However, when I start doing queries such as this:
Select AVG(Elevation)
From 'City'
Where Country='Germany';
This error will show up:
Error while executing SQL query on database'': no such table:
Is this because I wrote the syntax wrong or a setting in SQLiteStudio?
You have two issues with your query. The first is the single quotes. But, you have a space in the name of the table. So, to query it, you might need to use the space:
However, that is really, really silly. Just fix the table by removing the quotes when defining it:
To keep your life simple, just give columns and tables names that don't need to be quoted. Then, you don't ever need to use quotes when referring to them.