Sorting IP addresses in TSQL

后端 未结 3 1622
梦如初夏
梦如初夏 2021-01-21 23:25

I need my IP list sorted. Problem is that i want them sorted after the value in the first part, then second part and so on.

MYTABLE

DATA
20.1.2.1
100.1.1.1
20.1         


        
3条回答
  •  孤独总比滥情好
    2021-01-22 00:05

    This is something you'd use the INET_ATON() function in MySQL, while that doesn't exist for T-SQL, see this question for examples of how it can be done.

提交回复
热议问题