MySQL Forums
Forum List  »  Stored Procedures

Re: Creating table
Posted by: Peter Brawley
Date: March 10, 2013 06:00PM

What's the point of the cursor? Why not just something like ...

drop table if exists test_t1;
create table test_t1
(id_participant varchar(11), first_name varchar(45), date_interview date);

insert into test_t1
select distinct a.id_participant, a.first_name, b.date_interview
from
participants a
join master_interviews b on a.id_participant = b.participants_id_participant;

Options: ReplyQuote


Subject
Views
Written By
Posted
1841
March 10, 2013 05:20PM
Re: Creating table
928
March 10, 2013 06:00PM
1159
March 10, 2013 08:22PM
925
March 11, 2013 10:30AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.