我有一个在mysql表中的select语句,其结果如下:
topic user weight
"hello" 324 3
"hello" 21 1
"second thread" 34 1
"second thread" 21 1
"second thread" 32 1
"second thread" 3 3
"hello" 23 1
我希望将第一列“主题”转换为数字,以简化事情。是否可能只将一列像这样转换为数字:
topic user weight
1 324 3
1 21 1
2 34 1
2 21 1
2 32 1
2 3 3
1 23 1
非常感谢您的帮助!
最好的问候, Simone
查找表
和使用连接语句(JOIN)
。 - WhoaItsAFactorial