sql server - SQL Table Valued Parameter - Default Value -


i'm passing table valued parameter stored procedure use in clause, want check whether parameter has been passed-in or not first. best way check parameter of type? example, want select along lines of:

select *  tablename @tvp null or recordid in (select * @tvp) 

if parameter of table valued type not passed, empty table. can use:

select *  tablename not exists(select * @tvp)     or recordid in (select * @tvp) 

Comments

Popular posts from this blog

html - Firefox flex bug applied to buttons? -

html - Missing border-right in select on Firefox -

python - build a suggestions list using fuzzywuzzy -