Home > database >  May I take heavy writing has a problem?
May I take heavy writing has a problem?

Time:09-26

String sqlsel="select distinct conNum from AllCab order by cast (conNum as int) asc";
This is a c # statement, to remove the conNum all may not be the values of the thinking and arranged in ascending order, but an error, do not write so?

CodePudding user response:

Change out of him, so that you can write: the
String sqlsel="select distinct conNum from AllCab order by conNum asc";

CodePudding user response:

The select conNum
The from AllCab
Group by conNum
The order by conNum asc
This can also

CodePudding user response:

ConNum does not guarantee equal to cast (conNum as int), so there is something wrong with the original writing
  • Related