|
||
| Pearson Technology Consulting | ||
|
SQL Generator
The following files contain a stored procedure that will generate basic SQL statements (insert, select, update and delete) for a given table. It will also generate the associated stored procedures. When passed a valid table name, the stored procedure will generate five result sets: one each for the four basic SQL statements and one containing a script to drop and create the stored procedures. You will probably want to modify the "SQLGEN" stored procedure to more closely match your naming conventions and coding style. You might also benefit from creating several different versions. Go for it! Why a stored procedure versus a client application? Ease of maintenance and flexibility. And almost nothing for you to install. Just a single stored procedure to create in the target database! Let me know how it works for you. Email: joel.pearson@pearsontechnology.com (mailto) Download instruction: right click on the File link and "save target/link as..." P_PTC_SQLGEN_MYSQL5 (MySQL 5.0)... [ HTML ] [ File ] [ Example Output ] P_PTC_SQLGEN_MSSQL2000 (SQL Server 2000)... [ HTML ] [ File ] [ Example Output ] Back to Useful Stuff |