MySQL Forums
Forum List  »  Stored Procedures

Re: stored procedure and create table
Posted by: Robin Schumacher
Date: September 01, 2005 07:50AM

Christian -

Are you sure your source table exists in the database from which you're working? If my test table (t1) exists in the database, my call goes fine; if not, I get your error:

mysql> CREATE PROCEDURE show_test()
-> BEGIN
-> DROP TABLE IF EXISTS temp_show;
-> CREATE TABLE IF NOT EXISTS temp_show AS SELECT * FROM t1
-> ;
-> END
-> //
Query OK, 0 rows affected (0.00 sec)

mysql> call show_test() //
Query OK, 0 rows affected (0.02 sec)

mysql> drop table t1 //
Query OK, 0 rows affected (0.00 sec)

mysql> call show_test() //
ERROR 1146 (42S02): Table 'test.t1' doesn't exist
mysql>

Options: ReplyQuote


Subject
Views
Written By
Posted
3803
September 01, 2005 02:00AM
Re: stored procedure and create table
2210
September 01, 2005 07:50AM
1952
September 05, 2005 03:58PM


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.