Session

sp_CRUDGen – How to generate and use the Search Stored Procedure AKA (Kitchen Sink)

Tired of writing stored procedures where it feels like you are writing the same code over and over again? Need to develop an optional parameter or kitchen sink stored procedure because users want a “does everything report”? If so, attend my presentation to see what I built that will save you massive amounts of time!

sp_CRUDGen (https://kevinmartin.tech/go/sp_crudgen) is a free open-source SQL Server stored procedure that generates stored procedures for you based on your tables and metadata like foreign keys and data types. The generated stored procedure code utilizes the SQL Server community best practices.

You can use sp_CRUDGen to generate 11 different stored procedures from basic your Create, Read, Update, Delete, Upsert stored procedures to extremely advanced safe dynamic search stored procedures otherwise known as optional parameters, kitchen sink, Swiss army knife, catch-all queries.

The generated ‘Search’ (kitchen sink, optional parameters) stored procedure is the most exciting. sp_CRUDGen generates this dynamic, safe, and performant TSQL stored procedure for you. This will be the main stored procedure covered in this presentation.

sp_CRUDGen will auto-generate and regenerate stored procedures for you. If you want to customize one of the generated stored procedures, you can remove "auto-generated" comment section and the stored procedure will not be overwritten.

This project is being used by software developers and DBAs at the consulting company I work for. It saves massive amounts of development time and conforms to best practices.

Kevin Martin

Author of the open source projects sp_Develop and sp _CRUDGen, used by database developers and software developers. Find it on GitHub.

Minneapolis, Minnesota, United States

View Speaker Profile

Please note that Sessionize is not responsible for the accuracy or validity of the data provided by speakers. If you suspect this profile to be fake or spam, please let us know.

Jump to top