Reputation:
Table 1:
id name desc start date end date
----------------------------------------------
1 a abc 1/2/2010
2 b def 2/4/2012 2/2/2016
3 c adf 3/1/2015
4 d dde 2/2/2011 3/3/2012
if the end date is given or submited by user I jus want to see the output as
id name desc start date end date
----------------------------------------------
1 a abc 1/2/2010
3 c adf 3/1/2015
Upvotes: 0
Views: 63
Reputation: 141
Select * from table where end_date is null
would give you the answer in your example
Upvotes: 1
Reputation: 177
The below query would give the results of the table where end date is null
Select * from tablename
where enddate is null;
Upvotes: 1