-1
I have a table in which the field mainUnitId has the following data:
- Ad23
- Ad7
- Ad11
- Ad9
- Adv1
- Adv14
- Adv21
I need to bring in the search only those who have Ad + numbers after
My code:
SELECT * FROM Lesson L WHERE L.mainUnitId like 'Ad__';
Expected return:
- Ad23
- Ad7
- Ad11
- Ad9
Thank you!
only use "%" instead of "_":
like 'Ad%'
– Ricardo Pontual
Hello. In this case it will bring all values (Adv1,Adv14 and Adv21). I need the query to return only ( Ad23, Ad7, Ad11 and Ad9). Just the ones that start with "Ad" and have some number after.
– Lucas Lima
then you’ll have to write a regular Expression for that
– Ricardo Pontual