Skip navigation links

MySQL Forums :: Stored Procedures :: create table in store procedure mysql


Advanced Search

create table in store procedure mysql
Posted by: Adhitya Partawijaya ()
Date: August 22, 2011 09:13PM

Hi..

i'm newbie and i dont know when this topic placed.

i need help, how to create table in store procedure with mysql?

i have table reg_member (name varchar, address varchar, reg_date date)

I want to separate the member based on registration date to new table (reg_member_07 -> its mean member that registration on july)

structure table of reg_member_07 same as reg_member

step:

1. if now is the beginning of August, looking for members who register in the previous month (July)
2. create new table (reg_member_07) if exist insert all member on point 1 to new table (reg_member_07)
3. delete from old table (reg_member) all member in point 1



Edited 1 time(s). Last edit at 08/22/2011 09:17PM by Adhitya Partawijaya.

Options: ReplyQuote


Subject Views Written By Posted
create table in store procedure mysql 1354 Adhitya Partawijaya 08/22/2011 09:13PM
Re: create table in store procedure mysql 510 Rick James 08/25/2011 05:21PM


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.