1

I dont think this is possible as far as my knowledge ,but still trying my luck.

I Have got a Table as shown below

+---------+------+
| Item_ID | VAT  |
+---------+------+
|       1 | 5.00 |
|       2 | 7.00 |
|       3 | 3.00 |
+---------+------+

In case i pass multiple Item_ID (1,2,3) .

Is it possible to get the corresponding VAT values ??

Output expected is

5.00
7.00
3.00
Pawan
  • 31,545
  • 102
  • 256
  • 434
  • possible duplicate of [MySQL Multiple Where Clause](http://stackoverflow.com/questions/14046637/mysql-multiple-where-clause) – John Ruddell Sep 06 '14 at 15:31

1 Answers1

3

You can use the IN clause to specify a comma separated list of Item_ID to filter the records you want to return. For example:

SELECT VAT 
FROM tablename 
WHERE 
Item_ID IN (1, 2, 3);
Donal
  • 31,121
  • 10
  • 63
  • 72