Posts

Showing posts from November, 2017

List all the columns in tables

For MS SQL Server: select * from information_schema . columns where table_name = 'tableName'

Nested Stored Procedure

You can nest stored procedures up to 32 levels. Error Msg 8164, Level 16, State 1, Procedure some_sp, Line 8 An INSERT EXEC statement cannot be nested. It can't nest. If  some_sp  tries to call  some_other_sp  with INSERT-EXEC, you will get an error message. Thus, you can only have one INSERT-EXEC active at a time. This is a restriction in SQL Server. Based on the requirement we can use OUTPUT parameter to pass data between SP.