423,335 Members | 1,149 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 423,335 IT Pros & Developers. It's quick & easy.

even id numbers in a table called station

P: 1
Query a list of CITY names from STATION with even ID numbers only. You may print the results in any order, but must exclude duplicates from your answer.

This Was My Solutino....
Expand|Select|Wrap|Line Numbers
  1. SELECT CITY FROM STATION WHERE MOD(ID,2) = 0;
  2.  
BUT ITS NOT WORKING
Mar 2 '18 #1
Share this Question
Share on Google+
1 Reply


Frinavale
Expert Mod 5K+
P: 9,731
The SQL 'distinct' statement is used to return only distinct (different) values. So if you have multiple records with the same CITY value, this will only return records that have different values (see the link for more details)
Mar 5 '18 #2

Post your reply

Sign in to post your reply or Sign up for a free account.