本文介绍了请给我合适的查询以达到此波纹管要求。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

insert into test2 values(1,'A')
insert into test2 values(2,'B')
insert into test2 values(3,'C')
insert into test2 values(4,'D')

desiredout put-

 |id name o/p
  1   A   A2
  2   B   B3
  3   C   C4
  4   D   D1

What I have tried:

i tried with CONCATENATE Function but it doesn't satisfy this Requirement,
so please any one give the Query to achieve this requirement in SQL-Server.

推荐答案

SELECT [id], [name], [name]+CAST(([id]%4+1) as varchar) as op FROM test2

在线试用: []


这篇关于请给我合适的查询以达到此波纹管要求。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

11-01 14:00