i have account table which consists of account name,card no
and card no consists 16 digits now i want to retrieve the
data if card no starts from 4 then it should print visa and
if it starts from 5 then it should print master so plse help
me to write simple query with out store procs .
Answer Posted / rahul
hi every one.
select name,
case
when card_no like'4%' then 'visa'
when card_no like'5%' then 'master'
end result from account;
| Is This Answer Correct ? | 4 Yes | 1 No |
Post New Answer View All Answers
Explain atomicity?
What is extent? Types of extents?
code to create procedure for taking databse backup in sql server or i have the query for it but what it's query returns means i want to show on my jsp that the databse backup has been taken on the basis of that return value.does it returns 0 or 1.wat is the code for that
How do you make a trace?
What are the parts of a function?
How to find table changes in sql server?
How do we upgrade from SQL Server 6.5 to 7.0 and 7.0 to 2000?
Explain boyce and codd normal form(bcnf)?
How to generate create procedure script on an existing stored procedure?
Explain about merge replications?
What is a database table?
What is normalization of database? What are its benefits?
What is an index in a database?
What are different types of subquery?
How is table type constraint applied to a table?