SELECT c.course_id ,c_title ,start_date ,start_date + duration ,location FROM course c ,offering o WHERE o.course_id = c.course_id AND o.start_date > SYSDATE -200;
Asked
Active
Viewed 25 times
1 Answers
0
Assuming all you want are the rows that have cost between £300 and £2000:
SELECT * FROM [table] WHERE cost BETWEEN 300 AND 2000
Fill in the *
with the columns you need.

Ejesalva
- 123
- 11
-
I think you can use the `BETWEEN` keyword like this : `WHERE cost BETWEEN 300 AND 2000` – Crazyrems Jul 23 '15 at 14:55
-
how do i alter my table and set it ? i need to set if a user enter value more then 2000 or bellow 300 database wont accept it – moha Jul 23 '15 at 14:56
-
@moha Your probably going to want to post another question for that, since its another topic in itself. Validation would probably be easier to implement on the server and client side. [Link to some more information that I was reading up](http://stackoverflow.com/questions/1127122/should-data-validation-be-done-at-the-database-level) – Ejesalva Jul 23 '15 at 15:02
-
This is not what OP asked. The question was about how to prevent inserting new records with `cost` outside of a given range. – Jul 23 '15 at 15:16