SQL How can I do query to find only decimal prices from the table? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 3

SQL How can I do query to find only decimal prices from the table?

My query for now is: select id, name, price from product where name like '%a%' and price '%,%' But this '%,%' looks weird :) Is there any other better way?

31st Aug 2021, 3:21 PM
Martyna Tomaszewska
Martyna Tomaszewska - avatar
2 Answers
0
Is this way worked?
1st Sep 2021, 9:09 AM
Hassan Amer
Hassan Amer - avatar
0
It is working but I need to know if there is some other way to find from all prices only decimal numbers (only prices with amount after ',' like for example from table with prices: 200; 3,06; 58; 243,79; 10; in output should be: 3,06; 243,79).
1st Sep 2021, 11:37 AM
Martyna Tomaszewska
Martyna Tomaszewska - avatar