homework-jianmu/tests/army/query/function/ans/ascii.csv

7.0 KiB

1taos> select ASCII('hello')
2ascii('hello') |
3=================
4104 |
5taos> select ASCII('hello world')
6ascii('hello world') |
7=======================
8104 |
9taos> select ASCII('hello world!')
10ascii('hello world!') |
11========================
12104 |
13==========================================
14104 |
15taos> select ASCII('北京涛思数据科技有限公司')
16ascii('北京涛思数据科技有限公司') |
17================================================
18229 |
19taos> select ASCII('hello') + 1
20ascii('hello') + 1 |
21============================
22105.000000000000000 |
23taos> select ASCII('hello') - 1
24ascii('hello') - 1 |
25============================
26103.000000000000000 |
27taos> select ASCII('hello') from ts_4893.meters limit 5
28ascii('hello') |
29=================
30104 |
31104 |
32104 |
33104 |
34104 |
35taos> select ASCII('hello') + 1 from ts_4893.meters limit 1
36ascii('hello') + 1 |
37============================
38105.000000000000000 |
39taos> select ASCII('hello') + ASCII('hello') from ts_4893.meters limit 1
40ascii('hello') + ascii('hello') |
41==================================
422.080000000000000e+02 |
43taos> select ASCII(nch1) from ts_4893.meters order by ts limit 5
44ascii(nch1) |
45==============
46110 |
47228 |
48117 |
49112 |
50110 |
51taos> select ASCII(var1) from ts_4893.meters order by ts limit 5
52ascii(var1) |
53==============
54110 |
55112 |
56110 |
57112 |
58228 |
59===========================
60110 |
61228 |
62117 |
63112 |
64110 |
65taos> select ASCII(cast(nch1 as varchar)) from ts_4893.meters order by ts limit 5
66ascii(cast(nch1 as varchar)) |
67===============================
68110 |
69228 |
70117 |
71112 |
72110 |
73============================
7412100.000000000000000 |
7551984.000000000000000 |
7613689.000000000000000 |
7712544.000000000000000 |
7812100.000000000000000 |
79taos> select sqrt(ASCII(nch1)) from ts_4893.meters order by ts limit 5
80sqrt(ascii(nch1)) |
81============================
8210.488088481701515 |
8315.099668870541500 |
8410.816653826391969 |
8510.583005244258363 |
8610.488088481701515 |
87taos> select cast(ASCII(nch1) as int) from ts_4893.meters order by ts limit 5
88cast(ascii(nch1) as int) |
89===========================
90110 |
91228 |
92117 |
93112 |
94110 |
95taos> select ascii('taos')
96ascii('taos') |
97================
98116 |
99taos> select ascii('t')
100ascii('t') |
101=============
102116 |
103taos> select ascii('\'')
104ascii('\'') |
105==============
10639 |
107taos> select ascii(name) from ts_4893.d0 order by ts limit 10
108ascii(name) |
109==============
110108 |
111120 |
112108 |
113120 |
114108 |
115116 |
116104 |
117116 |
118116 |
119104 |
120taos> select ascii(name) from ts_4893.meters order by ts limit 10
121ascii(name) |
122==============
123108 |
124120 |
125108 |
126120 |
127108 |
128116 |
129104 |
130116 |
131116 |
132104 |
133taos> select ascii(nch1) from ts_4893.d0 order by ts limit 10
134ascii(nch1) |
135==============
136110 |
137228 |
138117 |
139112 |
140110 |
141110 |
14297 |
143228 |
144110 |
14597 |
146taos> select ascii(nch1) from ts_4893.meters order by ts limit 10
147ascii(nch1) |
148==============
149110 |
150228 |
151117 |
152112 |
153110 |
154110 |
15597 |
156228 |
157110 |
15897 |
159taos> select ascii(var1) from ts_4893.d0 order by ts limit 10
160ascii(var1) |
161==============
162110 |
163112 |
164110 |
165112 |
166228 |
167117 |
168112 |
169112 |
170112 |
171112 |
172taos> select ascii(var1) from ts_4893.meters order by ts limit 10
173ascii(var1) |
174==============
175110 |
176112 |
177110 |
178112 |
179228 |
180117 |
181112 |
182112 |
183112 |
184112 |
185taos> select ascii(null)
186ascii(null) |
187==============
188NULL |
189taos> select ascii('0')
190ascii('0') |
191=============
19248 |
193taos> select ascii(' ')
194ascii(' ') |
195=============
19632 |
197taos> select ascii('~')
198ascii('~') |
199=============
200126 |
201taos> select ascii('中')
202ascii('中') |
203===============
204228 |
205taos> select ascii('é')
206ascii('é') |
207==============
208195 |
209taos> select ascii('!@#')
210ascii('!@#') |
211===============
21233 |
213taos> select ascii('Hello')
214ascii('Hello') |
215=================
21672 |
217taos> select ascii('123abc')
218ascii('123abc') |
219==================
22049 |
221==========================
22265 |
223taos> select ascii(char(65))
224ascii(char(65)) |
225==================
22665 |
227taos> select ascii(upper('b'))
228ascii(upper('b')) |
229====================
23066 |
231taos> select ascii(trim(' A '))
232ascii(trim(' A ')) |
233=====================
23465 |
235name | ascii(name) |
236===============================================
237lili | 108 |
238================================================================
239lili | 108 |
240nch1 | ascii(nch1) |
241===============================================
242novel | 110 |
243var1 | ascii(var1) |
244===============================================
245novel | 110 |