|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| ||||||||||||||||||||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
SELECT for multiple values
Hello
I have a table tblpricelist which contains the field productid Suppose i want to select certain products only like SELECT * FROM tblpricelist where productid = 1 or 6 or 40 or 56 or 78 or 90 Say the productid list is too many (100s) how to do it. The products are selected arbitarily. There is no condition for selecting each product. Please help me out how to do this. Thanks |
|
#2
|
|||
|
|||
|
Code:
SELECT * FROM tblpricelist where productid in (1,6,40,56,78,90) |
![]() |
| Viewing: Dev Shed Forums > Databases > PostgreSQL Help > SELECT for multiple values |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|