我想从sql server
中的整个列名部门只提取前3个字符ID Department Salary Designation
1 Dept 1 20000 M1
2 Dept 2 23000 M2
3 Dept 3 25000 M3
4 Dept 4 50000 M4
5 Dept 5 30000 M5
6 Dept 6 20070 M6
O / P应该是
Departement
Dep
Dep
Dep
Dep
Dep
Dep
请在采访中询问这个问题吗?
答案 0 :(得分:1)
Select left(Department,3) from t