select
row,
case when length(name) > 10
then 'Name max=10 Present=' + length(name) + '; '
else '' end +
case when length(place) > 10
then 'Place max=10 Present=' + length(place) + '; '
else '' end +
case when length(address) > 10
then 'Address max=10 Present=' + length(address) + '; '
else '' end as error
from t
1条答案
按热度按时间0x6upsns1#
你可以用
CASE
: