how to know the current year in sql code example Example: get current year sql select year(getdate())