Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Difference Between EQ & IN

Former Member
0 Likes
5,212

Hi Frnds ,

Iam having one doubt in Sql Querys i.e. Wat is the difference between EQ & IN When validating with sql Querys ...

Regs ,

Narayana Murthy

8 REPLIES 8
Read only

Former Member
0 Likes
2,990

EQ is used to compare a single value while select query condition.

IN is used to compare a range of values while select query condition.

Read only

Former Member
0 Likes
2,990

Hi

EQ is used for single value comparison and IN is used for multivalue comparison.

For Eg. If you want to check Sales Order number is equal to some value then you use EQ.

and

IN is used when you want to check whether the Sales order number is in the set of given sales order numbers.

Read only

Former Member
0 Likes
2,990

Hi,

EQ is used to compare a single value while select query condition.

Ex : Parameters

IN is used to compare a range of values while select query condition.

Ex : SELECT-OPTIONS. This is like an internal table .So It has to check all the values of select-options(internal table).Becuase of that we have to use in for

1. SELECT-OPTIONS 2. RANGES.

Don't forget to reward if useful......

Read only

Former Member
0 Likes
2,990

Eq can be used for checking for single field value

whereas IN can be used for checking multiple values, it can be used with select options and ranges.

IN will provide all records when the field you are checking with is blank

whereas

EQ will provide only those records where that field is blank in that record .

for eg

clear ABC

select ............where xyz = ABC. ABC is a parameter or variable

only those record where xyz is blank

clear ABC

select ............where xyz IN ABC. ABC is a select option or range

will fetch records for all the values of xyz.

Read only

Former Member
0 Likes
2,990

hi,

EQ: This is used for single value field like parameters.

IN : this is used for a set of values / criteria/ranges... like select-options.

Regs,

Jogdand M B

Read only

Former Member
0 Likes
2,990

EQ is used for parameters which take single value it is used while declaring parameters.

IN is used for selecting range of values it is used while declaring select options and ranges.

P_test = '123456'. * parameter declaration

in SQL queries while declaring range of values we will use in

Example.

s_test in matnr.

s_test 123456 to 1456789.

reward if useful.

Read only

Former Member
0 Likes
2,990

Hi,

EQ is used to check against the single value.

IN is used to validate against range of values.

Reward if it is helpful

Regards.,

Sangeetha.A

Read only

sreeramkumar_madisetty
Active Contributor
0 Likes
2,990

Hi

by using EQ in conditions you can get a single value.

By using IN in conditions you can get a list of values.

when we are using conditions on selection texts, we use IN.

Regards,

Sreeram