I'm looking for a query to fetch multiple column data for many rows at once.
Table 1. No null value
customer, price1, price2, price3, ..., price10
Tata, 100, 200, 300, ..., 1000
Ford, 111, 222, 333, ..., 1388
I can use below query:
SELECT *
FROM table1
WHERE (customer,price1,price2,price3,...~price10)
IN (
(Tata,100,200,300,400,500,..~1000)
OR
(Ford,111,222,333,444,555,...~1388)
Table 2:
consumer_code, price1, price2, price3, price4, …, price10
Chn, 100, 200, (null), (null), …, 600
Hyd, 121, 378, 262, (null), …, (null)
SQL where in operator doesn't accept null values. Any suggestions for a better query?
I need to pass bulk data say >500 or 1000 at once so as to reduce multiple db operations by using multiple select statements and improve the retrieval speed.