mysql - sql : allow same period for just two entries -


i have table provider (id , name, startdate , enddate ) confirm insertion of 1 provider on : 2 conditions: - there no other providers in period or second provider in period.

i need make verification sql request

select count(p.*) provider p p.startdate < :newenddate , p.enddate >= :newstartdate 

the use of < vs. <= , > vs. >= depends on notion of overlapping of intervals.


Comments

Popular posts from this blog

toolbar - How to add link to user registration inside toobar in admin joomla 3 custom component -

linux - disk space limitation when creating war file -

How to provide Authorization & Authentication using Asp.net, C#? -