MySQL Forums
Forum List  »  Stored Procedures

Re: Creating table
Posted by: Patricio Calderon
Date: March 10, 2013 08:22PM

Thank you Peter, that worked out well. The reason why I included the cursor was because I wanted to make the process of updating the test_t1 table, based on the base select statement, automatically. Would your example work if I create a select statement with multiple subqueries?

Thanks,

Patricio

Peter Brawley Wrote:
-------------------------------------------------------
> 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
1847
March 10, 2013 05:20PM
934
March 10, 2013 06:00PM
Re: Creating table
1160
March 10, 2013 08:22PM
932
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.