Quote:
How do I get all records with birthday falling today in oracle
Not your actual problem, but another approach.
Lets guess the procedure will be run everyday, if the table is about 20 people, no matter how you do, the workload will be about the same, if table handle millions of people, the way to do the query matters.
Your approach : runtime is linear with number of people to handle, with some computing for every people in table, the SQL server can't do any optimization.
The other approach: make a field 'DayOfBirth' containing only day and month of birth as a string, the field is constant after creation (just like date of birth), make the field indexed.
The difference: Runtime depend on number of people with the birth today, which is roughly number of people/365, with no computing for other people, The SQL server take advantage of index, thus the acceleration.
Advice: Rather than Email, return people Id in table, because you may want to personalize the Email with FirstName and Age.
Dear [FirstName],
We want to be first to whish you an happy [Age]th birthday.