Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Modifying query to return one aditional column with a default value.

Status
Not open for further replies.
Jun 5, 2006
28
US
Hi,
I have the following query:

select first_name,last_name, address
from address_book

which returns the following table

john smith 393 Jones RD
bill smith 345 Jenkins RD

I would like to modify the query so the resulting query returns a table that looks like this

john smith 393 Jones RD 0
bill smith 345 Jenkins RD 0

In other words I want to modify the query so that it returns a table with four columns, and the forth column is always 0.

Thanks.

 
select first_name,last_name, address, 0 AS Whatever_You_Want_To_Call_The_Column
from address_book
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top