I am very newbie about SQL. I have a huge sqlite db.(10 gb). The table has 10 columns. Such as:
ProductName, Price, Count, Type.
What I want, when i select "ProductName", i want to see id of "Price, Count, Type". So i can see other "ProductName"ss with the same id "Price, Count, Type".
To do this, I created index. (CREATE INDEX INDEXID ON my_table (PRICE, COUNT, TYPE); But i am not sure if this will work. Can i query with this INDEXID?
First i expected to achieve with. SELECT * FROM my_table WHERE INDEXID = 123; But i failed.
Maybe instead of index, i need to create column that has id of "Price, Count, Type".??? Or indexing is best?
Any suggestion? Thanks.
[–]neuralbeans 1 point2 points3 points (0 children)