setting up a default value of a column in select statement
I know this thread is very old but in case someone needs an answer to Nimmagadda's question, you should be able to accomplish it with something along the lines of:
SELECT name, city, addr,
CASE name
WHEN 'john' THEN 12345
WHEN 'peter' THEN 123
ELSE 0 /* ???? */ END AS ph_no
FROM table1
Yes, you can do this:
SELECT name, city, addr, 12345 AS ph_no
FROM table1