I dont know if i choose the right title for my question. I have that table like this in my database.

NAME                                               class_num
-------------------------------------------------- --------
name1                                               2
name2                                               4
name3                                               1

And what I want to do is: Update the class_num to be in order like the name. The result from what I want is that:

    NAME                                            class_num
-------------------------------------------------- ---------
name1                                                1
name2                                                2
name3                                                3

Is any way to do that with a QUERY? Or I need to do from C# code?

Sorry my english, please help. Thanks.

Related posts

Recent Viewed