Pregunta

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!

¿Fue útil?

Solución

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';

Otros consejos

Select count(name) from your_db_name where city='London'

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top