Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CONSTRAINT t1_201611_check CHECK (date_id >= 20161101 AND date_id <= 20161130)
- CONSTRAINT t1_201612_check CHECK (date_id >= 20161201 AND date_id <= 20161231)
- select * from t1
- where date_id >= 20161201
- and date_id <= 20161231;
- select * from t1
- where date_id >= to_char('2016-12-01'::date, 'YYYYMMDD')::int
- and date_id <= to_char('2016-12-31'::date, 'YYYYMMDD')::int;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement