+1 vote
in Databases by (60.0k points)
I need an SQL query to select all rows from the concepts table with concept_codes between F01 and F99, including both. I am using the PostgreSQL database, so the syntax should be compatible with PostgreSQL.

1 Answer

+2 votes
by (354k points)
selected by
 
Best answer

To specify a range of values in SQL, you can use the BETWEEN clause. For example, if you want to retrieve all rows from the concepts table where the concept_code falls within the range of 'F01' to 'F99', you can use the following SQL query:

SELECT * FROM concepts
WHERE concept_code BETWEEN 'F01' AND 'F99';
This query will return all records from the concepts table where the concept_code is between 'F01' and 'F99'.

Related questions


...