mirror of
https://github.com/taosdata/TDengine
synced 2026-05-24 10:09:01 +00:00
3 KiB
3 KiB
| 1 | taos> select CRC32('hello') |
|---|---|
| 2 | crc32('hello') | |
| 3 | ================= |
| 4 | 907060870 | |
| 5 | taos> select CRC32('hello world') |
| 6 | crc32('hello world') | |
| 7 | ======================= |
| 8 | 222957957 | |
| 9 | taos> select CRC32('hello world!') |
| 10 | crc32('hello world!') | |
| 11 | ======================== |
| 12 | 62177901 | |
| 13 | ========================================== |
| 14 | 1785960545 | |
| 15 | taos> select CRC32('北京涛思数据科技有限公司') |
| 16 | crc32('北京涛思数据科技有限公司') | |
| 17 | ================================================ |
| 18 | 1935136661 | |
| 19 | taos> select CRC32('hello') from ts_4893.meters limit 5 |
| 20 | crc32('hello') | |
| 21 | ================= |
| 22 | 907060870 | |
| 23 | 907060870 | |
| 24 | 907060870 | |
| 25 | 907060870 | |
| 26 | 907060870 | |
| 27 | taos> select CRC32('hello') + 1 from ts_4893.meters limit 1 |
| 28 | crc32('hello') + 1 | |
| 29 | ============================ |
| 30 | 907060871 | |
| 31 | taos> select CRC32('hello') + CRC32('hello') from ts_4893.meters limit 1 |
| 32 | crc32('hello') + crc32('hello') | |
| 33 | ================================== |
| 34 | 1814121740 | |
| 35 | taos> select cast(CRC32('hello') as VARCHAR) |
| 36 | cast(crc32('hello') as varchar) | |
| 37 | ================================== |
| 38 | 907060870 | |
| 39 | taos> select CRC32(cast('hello' as VARCHAR)) |
| 40 | crc32(cast('hello' as varchar)) | |
| 41 | ================================== |
| 42 | 907060870 | |
| 43 | taos> select crc32('') |
| 44 | crc32('') | |
| 45 | ============== |
| 46 | 0 | |
| 47 | taos> select crc32(NULL) |
| 48 | crc32(null) | |
| 49 | ============== |
| 50 | NULL | |
| 51 | taos> select crc32(1234) |
| 52 | crc32(1234) | |
| 53 | ============== |
| 54 | 2615402659 | |
| 55 | ============================== |
| 56 | true | |
| 57 | taos> select crc32(1234.567) |
| 58 | crc32(1234.567) | |
| 59 | ================== |
| 60 | 2518325432 | |
| 61 | taos> select crc32(1234.567) = crc32('1234.567') |
| 62 | crc32(1234.567) = crc32('1234.567') | |
| 63 | ====================================== |
| 64 | true | |
| 65 | taos> select crc32(1234.567 + 0.1) = crc32('1234.667') |
| 66 | crc32(1234.567 + 0.1) = crc32('1234.667') | |
| 67 | ============================================ |
| 68 | true | |
| 69 | =================================================================== |
| 70 | true | |
| 71 | =================================================================== |
| 72 | true | |