"actually i want to add data in sql server for the employees... i want to avoid last three entries for the same month... which query can be made to insert data into table and on the same month same employee can not be add?"
To do that, you need to check first:
SELECT COUNT(*) FROM MyTable
GROUP BY UserName, Year, Month
WHERE Year = @CurrentYear AND Month = @CurrentMonth
(Obviously, you'll have to provide the year and month values
Then if the number of less than three you can insert
I'd do this in a stored procedure (and I'd store the month and year as a DateTime, not separate fields)