0

What is the difference from IN and between?

9th May 2016, 4:03 AM
Siegfrid Medrana
7 Answers
+ 6
For between you can specify the range of values. But for IN you have to enter the values which you want. 1)You want the values from 1 to 10 Between 1 and 10 IN (1,2,3,4,5, 6,7,8,9,10) 2) you want values 4 and 6 In this case you can't use between IN (4,6)
20th Jun 2016, 7:46 PM
Siva Madhusudhan Reddy
+ 4
You have to define your all the values in IN operators, but in BETWEEN you have to define only start and end point. IN operators is mostly used for making sub -query in which your values are fetched from another query. Example : SELECT * FROM students WHERE class_teacher IN (SELECT * FROM teacher WHERE age BETWEEN 35 AND 55)
13th Jul 2016, 9:28 AM
Suryaprakash Tiwari
Suryaprakash Tiwari - avatar
+ 1
in is to check for a condition where d given attribute's value is in the given set of values WHERE ID IN(1,5,6) it is true if id=1 or 5 or 6 BETWEEN is used to check if given attribute's value is in between a specified range WHERE ID BETWEEN 5 AND 10 ie., ID>5 AND ID<10
14th Aug 2016, 4:22 PM
ravi kumar K N
0
between means... if u want to select the range.like( 1 to 10) or(A to z) The IN operater returns the value in the column u entered
21st Jun 2016, 12:47 PM
Vinith Ps
Vinith Ps - avatar
0
1)Between A and B is used if you want to have the values between A and B (Note: Both A and B inclusive) Between 1 and 10 2)IN is used if you want check whether the value is in the given domain or not IN (a,b,c,d,e)
26th Jun 2016, 9:21 AM
Sai Kartheek
Sai Kartheek - avatar
0
The between operator selects a range: WHERE age BETWEEN 20 AND 25; The IN operator selects values: WHERE gender IN ('male', 'female');
5th Jul 2016, 4:55 AM
Rafael Valverde
Rafael Valverde - avatar
0
simply think.... between is used to select things in between two no. and in is used to select things from your choice u have righten in braces..
23rd Jul 2016, 7:08 AM
Darsh Shah
Darsh Shah - avatar