纸杯简笔画:请问:SQL 语句中,当a这个字段的长度等于4时取它的后三位,该怎么写?
来源:百度文库 编辑:高校问答 时间:2024/06/01 13:37:24
SQL Server:
select case len(a) when 4 then substring(a, 2,3) else a end from xxxx
SQL Server:
select case len(a) when 4 then substring(a, 2,3) else a end from xxxx