Hii Group,

This is samuel Like to hav a small suggestion from you hope u ppl do.
"I would like to copy dat from one table to another of the same database in a give
timestamp,I mean when system time equals to the feild time then the entire data should
be transfered Will it be possible in MySql?

To be more specific:

1.The Tables doesnt have same structure.

Hope it is clear.

So,all the Querie may be simple but please kindly explain me the proccess to do so.

Thanks in Advance.

9 Years
Discussion Span
Last Post by bvssam


Thanks for the reply ...I wrote a procedure which copies the data from one table to other but no idea regarding when and where it should be invoked in order to tansfer at the given timestamp.



Sorry For the delayed reply.

The functionality db of my appplication is around two tables
both of different structures.



Ok SO the Table Schedule is populated before and when ever the "Timetosend " equals to that of system time then the selected rows whose feild value(TimeToSend)
should be copied to Table Out

I would like to know how to solve this minor task

when I googled a bit I found "mysql.event" ,Can I Use the same here.... if so please let me know how to do so.

Thanks in Advance.


>>select into

I think it is used in SQL Server.
is it possible in Mysql?


event i believe is only only available in 5.1.6

select into with my sql is an insert statement with a select

insert into Out(recipient, Text)
select recipient, Text from Schedule where TimeToSend = curdate();

i would suggest timetosend be <= curdate(), you'll never get a match exactly on times most likely unless you are going by date only


Hi, Thanks fo rthe reply right now I odnt have nay problem with my statements..

yes u r right mysql.event is available for 5.1.6 or gretaer than that

I wrote a procedure schedule() in that proc i used the "insert into command " ..
when i created an event using

"create event transfer on schedule every 1 second
do call db.schedule();"

it works fine ... but i have a minor probvlem here ..
when my system reboots .. the event doesnt work automatically ..

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.