I am currently migrating a database from mssql to mysql.
This mssql database has (sigh) many stored procedures in it. These
stored procedures are automatically generated from a UML model.
I am trying to change the UML model to generate C code so I can create
user defined functions with the same functionality as the mssql stored
procedures.
[I eagerly look forward to mySQL stored procedures - my server is going
way to fast :-) ]
This UML generation also creates a script to populate the database
server with the "stored procedures" using "create function" calls (or in
the case of mssql, using "create procedure" calls).
The MS SQL Server generated script contains code that deletes the stored
procedure if it exists (prior to recreating it) using code that looks
like this....
-- snip
IF EXISTS (SELECT * FROM sysobjects WHERE uid=user_id()
AND type='P'
AND name='InfDropCurrentParametersTable')
BEGIN
PRINT ' > DROPPING - InfDropCurrentParametersTable ...'
DROP PROCEDURE InfDropCurrentParametersTable
END
GO
...
-- snip
Is there any way of doing a similiar check in MySQL? I know I can just do a
DROP FUNCTION InfDropCurrentParametersTable;
and live with the error if it doesn't exist, but it would be nice to
make the script tidy.
Many regards,
Ian Collins.
---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php