+ 1

How to create a query in sql where letters in the table are in the range from 'a to h' ?

5th Sep 2018, 6:13 AM
No Wa
No Wa - avatar
3 Respuestas
+ 4
select * from /table-name/ where /column-name/ in (a,b,c,d,e,f,g,h); This is for selecting values in that range I am actually not sure how to allow values only in that range......
5th Sep 2018, 6:30 AM
HRITHIK TIWARI
HRITHIK TIWARI - avatar
+ 3
I had never used BETWEEN for checking a single character field, but you might wanna give it a try; SELECT <fields_list> FROM <table_name> WHERE <field_name> BETWEEN 'a' and 'h'; * Reference: https://www.w3schools.com/sql/sql_between.asp Hth, cmiiw
5th Sep 2018, 6:42 AM
Ipang
+ 1
No Wa I hope you got the answer
5th Sep 2018, 6:31 AM
HRITHIK TIWARI
HRITHIK TIWARI - avatar