Database Function VS Case Statement

前端 未结 3 1315
萌比男神i
萌比男神i 2021-02-20 14:11

Yesterday we got a scenario where had to get type of a db field and on base of that we had to write the description of the field. Like

Select ( Cas         


        
3条回答
  •  花落未央
    2021-02-20 14:51

    Your devolper is right. Functions will slow down your query.

    https://sqlserverfast.com/?s=user+defined+ugly

    Calling functionsis like:
    wrap parts into paper
    put it into a bag
    carry it to the mechanics
    let him unwrap, do something, wrapt then result
    carry it back
    use it
    

提交回复
热议问题