HackerRank – Select All

HackerRank SQL Problem 3 – Difficulty: Easy

Learn SQL by solving problem #3

Here is one of the easy problems of HackerRank, with its solution, examination, and brief query.

Problem 3

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

Input Format

The CITY table is described as follows:

FieldType
IDNUMBER
NAMEVARCHAR2(17)
COUNTRYCODEVARCHAR2(3)
DISTRICTVARCHAR2(20)
POPULATIONNUMBER

Examination

“Query all columns” is going to be: SELECT *

“in the CITY table” means: FROM CITY

Code

The final code is going to be:

SELECT * FROM CITY;

Leave a Reply

Your email address will not be published. Required fields are marked *