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 the categories of stored procedure?
What is built-in/administrator?
When a primary key constraint is included in a table, what other constraints does this imply?
How to recompile stored procedure at run time?
do you know how to configure db2 side of the application? : Sql server database administration
How to select an exiting database using mssql_select_db()?
Do you know clustered and non-clustered index?
What is partitioned view?
Is sql server difficult to learn?
What is use of @@ spid in sql server?
Can we install sql server 2016 on windows 7?
What do you understand by user-defined function in the sql server?
Which tcl commands are available on the sql server?
Can we return Data from 4(more than 1) tables in stored procedure?
What are the advantages of passing name-value pairs as parameters?