Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
frank.svs
Constraint Violating Yak Guru
368 Posts |
Posted - 2007-03-13 : 02:35:22
|
| Hi pals, using EXISTS operator i need to display/output where the given employee no is existing or not i.e YES/NO. select 1 from emp where empno=:v_empno how to modify the above sql qry. Regards, franky |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2007-03-13 : 02:41:28
|
[code]if exists (select * from emp where empno = @v_empno) print 'YES'else print 'NO[/code] KH |
 |
|
|
frank.svs
Constraint Violating Yak Guru
368 Posts |
Posted - 2007-03-13 : 03:16:25
|
| thank you very much. |
 |
|
|
|
|
|