Hi I want to create a simple stored proecudre which does the following:
Psudocode
@tempSelect = 'SELECT * FROM Table' if (@Param is NULL) then exec @tempSelect else exec @tempSelect + ' WHERE id = ' + @Param + '
Is this method efficent? Thank you.
Try