Saturday, May 8, 2010

SQL Between Clause

0 comments
The BETWEEN expression  with AND specified the range and tells the database that to select desired records for this range like wise to find out all those transactions that have been done in the month of may-2010.
Example

Select c.customer_name,i.invoice_no,i.invoice_Date
from sales s
inner join customer c on s.customer_id=c.customer_id
where s.sales_date between '2010-05-01 00:00:00' and '2010-05-31 23:59:59'

0 comments: