문제

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'

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top