Home » RDBMS Server » Server Administration » CASE STATEMENT
CASE STATEMENT [message #373103] Tue, 27 March 2001 15:11 Go to next message
CHACKO
Messages: 11
Registered: March 2001
Junior Member
Can we use Case statement in sql? DO YOU KNOW THE SYNTAX.
Re: CASE STATEMENT [message #373118 is a reply to message #373103] Wed, 28 March 2001 08:17 Go to previous message
Balamurugan.R
Messages: 91
Registered: March 2001
Member
Hi,
The syntax is

select ename,case when sal>1000 then
'salary greater than 1000' else 'salary is less than 1000' end from emp;
Previous Topic: RE:OCP EXAM
Next Topic: the in clause
Goto Forum:
  


Current Time: Mon Dec 23 06:03:21 CST 2024