|
show create table t_windowing_function_convert;
CREATE TABLE `t_windowing_function_convert` (
`ids` bigint(20) DEFAULT NULL,
`names` varchar(100) DEFAULT NULL
) ENGINE=Columnstore DEFAULT CHARSET=utf8;
MariaDB [mcsinfo]> select * from t_windowing_function_convert;
---------------+
---------------+
---------------+
3 rows in set (0.00 sec)
result 1:
MariaDB [mcsinfo]> select ids,names from t_windowing_function_convert order by convert(names using gbk) desc;
---------------+
---------------+
---------------+
3 rows in set (0.02 sec)
result 2:
MariaDB [mcsinfo]> select ids,names, row_number() over(order by convert(names using gbk) desc) from t_windowing_function_convert;
------------------------------------------------------------------------
| ids |
names |
row_number() over(order by convert(names using gbk) desc) |
------------------------------------------------------------------------
------------------------------------------------------------------------
3 rows in set (0.00 sec)
|