Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个大表,其中有一列包含相同的字符串数据“Dummy”。我需要在该字符串的末尾添加一个顺序计数以使其唯一。IE:
Dummy1 Dummy2 Dummy3
对于我的生活,我无法做到这一点。我不想要一个新列,也不想要一个新表。
尝试这个
select columnname + ' ' + rank() OVER (ORDER BY columnname) as data from tablename