Simple SQL Help Needed

Phil_b

Registered User.
Local time
Today, 05:05
Joined
Oct 7, 2005
Messages
30
Hi all !

Im having an annoying debate with my brother who knows very little about SQL. Anyhow what would you guys say the SQL query for the following would be:

'What is the first and last name of customer 405'

The table is called 'CUSTOMER' and the respective columns are 'CUST_FIRST', 'CUST_LAST' and 'CUST_NUMB'.


Thanks in advance !

Phil
 
Code:
3) Query: SELECT CUST_NUMB, CUST_FIRST, CUST_LAST FROM CUSTOMER WHERE CUST_NUMB = 405;

Description: The query to the top left pulls the CUST_NUMB, CUST_FIRST and CUST_LAST from the table CUSTOMER where the CUST_NUMB is 405. (Added the CUST_NUMB column to show that CUST_NUMB 405 was displayed)

That was my answer to the question. I thought it was important to show the extra column because the table could have been typed in incorrectly and to prov it was customer 405 if the person didn't have the query.
 
lol. Just to clarify my brother came to me for help and I explained that the question is asking for you to return two columns (first and last name). If it was asking for the ID as well it would ask you to list the ID.

This is such simple SQL I cant even believe im debating it here but a third party answer would be appreciated.
 

Users who are viewing this thread

Back
Top Bottom