SQL to create a Trigger for MySQL

I have a  MySQL database with a date field.  I want a Trigger to pull the Weekday word out of that value and place it into another field on record creation.  I am not finding a sample of how to do so in my hunting around.  Any thoughts?  Thanks much.
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Nitin SontakkeDeveloperCommented:
DISCLAIMER FIRST: I not much of MySQL guy and shouldn't technically be posting a comment here.

Your usage of word trigger and the requirement doesn't really jell together with respect to database nomenclature hence the comment. Can you possibly share some mock table structure, sample data and what you are expecting as output and / or expect to see happening.

Such an information would potentially also be helpful to any other MySQL expert attempting to understand / answer your question.
weklicaAuthor Commented:
Basically, I have a timestamp as one field.  I have another 'Weekday' field that is currently NULL.  But, upon insertion of a new record, the timestamp field is always populated.  I would like to have the Weekday name pulled from that timestamp field and inserted into the 'Weekday' field automatically.  I re-read my initial post and agree it didn't quite sound detailed enough.
Nitin SontakkeDeveloperCommented:
First it is not clear where you are stuck. Is it pulling weekday from the timestamp or writing a trigger. Either of which can be done with a bit of a help from Google.

Second, assuming you determine how to arrive at Weekday from timestamp, why would you have it persisted in a table and waste storage. It can very well be achieved by just adding one column at the time of select or better still have a view which does the job and use it.

I would discourage you to store something which can easily be arrived at from the value of another column.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.