开发者

sql-function to get lines including a certain date

I have an SQL table with columns like this:

Person | Property 1 | Property 2 | ... | BEGIN-DATE | END-DATE

I'd like to get all Information that are valid on a certain date.

Is there a special SQL-Function (like BETWEEN or OVERLAPS开发者_如何学JAVA) checking if BEGIN-DATE < DATE < END-DATE? (Somehow the opposite of BETWEEN.)

Thank you!


SELECT *
FROM Table
WHERE getdate() between BEGIN-DATE and END-DATE
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜