티스토리 뷰

728x90

Revising the Select Query I

Query all columns for all American cities in the CITY table with populations larger than 100000. The CountryCode for America is USA.The CITY table is described as follows:

 

SELECT *
FROM CITY
WHERE POPULATION > 100000
    AND COUNTRYCODE = 'USA';

Revising the Select Query II

Query the NAME field for all American cities in the CITY table with populations larger than 120000. The CountryCode for America is USA.

The CITY table is described as follows:

SELECT NAME FROM CITY 
WHERE CountryCode = 'USA' 
	AND POPULATION > 120000;

Select All

Query all columns (attributes) for every row in the CITY table.

The CITY table is described as follows:

SELECT *
FROM CITY;

Select By ID

Query all columns for a city in CITY with the ID 1661.

The CITY table is described as follows:

SELECT * 
FROM CITY 
WHERE ID = 1661;

Japanese Cities' Attributes

Query all attributes of every Japanese city in the CITY table. The COUNTRYCODE for Japan is JPN.

The CITY table is described as follows:

SELECT * 
FROM CITY 
WHERE COUNTRYCODE = 'JPN';
728x90
LIST
댓글
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
링크
«   2024/03   »
1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
31
글 보관함