crazyProgrammer
crazyProgrammercrazyProgrammer
Build Dynamic SQL in a Stored Procedure After reading this article you will understand the basics of dynamic SQL; how to build statements based on variable values, and how to execute those constructed statements using spexecutesql and EXECUTE from within a stored procedure.
3 Answers
@Massie already mentioned one approach using anonymous block.
Another approach is using bind variable in command line like below -
pratik gargpratik garg2,81211 gold badge1313 silver badges2121 bronze badges
Álvaro González109k3131 gold badges197197 silver badges287287 bronze badges
massiemassie
Since you're asking about 'in SQL Developer' - here's the answer from the IDE perspective.
- Find your procedure in your database navigation tree.
- Click or double-click to open in a plsql editor
- Hit the Execute Button in the toolbar
- Supply required input values and hit OK to execute
- Observe any output returned in the bottom log panel
9,31211 gold badge1515 silver badges5151 bronze badges