You need to figure out the syntax difference of queries in various DBMS (MySQL , Postgres and SQLLite
).
In my opinion this query should be similar in all three DBMS.
SELECT COUNT(Name) AS "No of Peoples" FROM TableName WHERE City = 'London';
题
Sorry for my lame question I am new to the databases and SQL, Is the any SQL command for the finding out how many people are living in london from the database below?
.....................
Name | City
.....................
John | London
Watson | New York
Sherlock | London
Holmes | Berlin
Mycroft | innsbruck
.....................
Secondly, are the commands for PostgresSQL, MySQL, SQLlite same?
Thanks!
解决方案
You need to figure out the syntax difference of queries in various DBMS (MySQL , Postgres and SQLLite
).
In my opinion this query should be similar in all three DBMS.
SELECT COUNT(Name) AS "No of Peoples" FROM TableName WHERE City = 'London';
其他提示
Select count(name) from your_db_name where city='London'