Chr () and ASCII () functions in Oracle (attached: characters commonly used and ASCII table)

Source: Internet
Author: User
Tags delete key

Chr () and ASCII () functions in Oracle (attached: characters commonly used and ASCII table) keywords: chr () Chr () function action: Special handling of "special" characters The corresponding loadline and special characters can be queried in Plsql

Chr () Function Example: select CHR from dual; ASCII () Function Example: Select ASCII (' & ') from dual;

For example, why is "&" a special character in Oracle? After the search, finally revealed the answer: the original & this character is used in Oracle SQL statements or stored procedures to specify that it is followed by the execution of the variables you enter. For example: SELECT * from &AAA; the system prompts you to assign a value when executing this statement. Or, for example, insert into Test (Col1,col2,col3,type) VALUES (0,0,0, ' &type ') when executing this statement in PL/SQL developer A variables prompt box will pop up asking you to enter the variable ' type ' value. And if executed: INSERT INTO Test (Col1,col2,col3,type) VALUES (0,0,0,CHR (38) | | Type '), it will obediently insert this data into the table. This, all doubts are cloud open fog scattered liao! ~

When special characters are processed separately (add ' or Chr (ASCII)), then use | | Connect other characters.

The following is a common character and ASCII table for reference:

The first part from 00H to 1FH a total of 32, generally used for communication or as a control, some characters can be displayed on the screen, some will not be displayed on the screen, but can see its effects (such as newline characters, return characters).

The second part is from 20H to 7FH a total of 96, these 95 characters are used to denote Arabic numerals, English letters and the bottom line, brackets and other symbols can be displayed on the screen. As the following table:

ASCII code character   ASCII code character   ASCII character   ASCII code character
Decimal 16 Rounding Decimal 16 Rounding Decimal 16 Rounding Decimal 16 Rounding
032 20 056 38 8 080 50 P 104 68 H
033 21st ! 057 39 9 081 51 Q 105 69 I
034 22 " 058 3 A : 082 52 R 106 6A J
035 23 # 059 3 b ; 083 53 S 107 6B K
036 24 $ 060 3C < 084 54 T 108 6C L
037 25 % 061 3D = 085 55 U 109 6D M
038 26 & 062 3E > 18W 56 V 110 6E N
039 27 063 3F ? 18V 57 W 111 6F O
040 28 ( 064 40 @ 088 58 X 112 70 P
041 29 ) 065 41 A 089 59 Y 113 71 Q
042 2 A * 16W 42 B 090 5 A Z 114 72 R
043 2 b + 16V 43 C 091 5B [ 115 73 S
044 2 C , 068 44 D 092 5C \ 116 74 T
24w The - 16X 45 E 093 5D ] 117 75 U
046 2E . 070 46 F 094 5E ^ 118 76 V
047 2F / 071 47 G 095 5F _ 119 77 W
048 30 0 072 48 H 096 60 ` 120 78 X
049 31 1 073 49 I 097 61 A 121 79 Y
050 32 2 074 4 A J 098 62 B 122 7A Z
051 33 3 075 4 b K 099 63 C 123 7B {
052 34 4 076 4C L 100 64 D 124 7C |
053 35 5 077 4D M 101 65 E 125 7D }
054 36 6 078 4E N 102 66 F 126 7E ~
055 37 7 079 4F O 103 67 G 127 7F

The third part from 80H to 0FFH a total of 128 characters, commonly referred to as "extended character", these 128 expansion characters are developed by IBM, not the standard ASCII code. These characters are used to denote lines, phonetic symbols, and other non-English-language letters in Europe.

ESC key

Vk_escape (27)

Enter

Vk_return (13)

TAB key

Vk_tab (9)

Caps Lock key

Vk_capital (20)

Shift key

Vk_shift ()

CTRL key

Vk_control (17)

ALT key

Vk_menu (18)

Space key

Vk_space (/32)

Backspace key

Vk_back (8)

Left logo key

Vk_lwin (91)

Right logo key

Vk_lwin (92)

Right-click Shortcut keys

Vk_apps (93)

Insert key

Vk_insert (45)

Home key

Vk_home (36)

Page up

Vk_prior (33)

PageDown

Vk_next (34)

End key

Vk_end (35)

Delete key

Vk_delete (46)

Arrow keys (←)

Vk_left (37)

Arrow keys (↑)

VK_UP (38)

arrow keys (→)

Vk_right (39)

Arrow keys (↓)

Vk_down (40)

F1 Key

VK_F1 (112)

F2 Key

VK_F2 (113)

F3 Key

VK_F3 (114)

F4 Key

VK_F4 (115)

F5 Key

VK_F5 (116)

F6 Key

VK_F6 (117)

F7 Key

VK_F7 (118)

F8 Key

Vk_f8 (119)

F9 Key

VK_F9 (120)

F10 Key

VK_F10 (121)

F11 Key

VK_F11 (122)

F12 Key

VK_F12 (123)

Num Lock key

Vk_numlock (144)

Numpad 0

VK_NUMPAD0 (96)

Numpad 1

VK_NUMPAD0 (97)

Numpad 2

VK_NUMPAD0 (98)

Numpad 3

VK_NUMPAD0 (99)

Numpad 4

VK_NUMPAD0 (100)

Numpad 5

VK_NUMPAD0 (101)

Numpad 6

VK_NUMPAD0 (102)

Numpad 7

VK_NUMPAD0 (103)

Numpad 8

VK_NUMPAD0 (104)

Numpad 9

VK_NUMPAD0 (105)

keypad.

Vk_decimal (110)

Small keyboard *

Vk_multiply (106)

Keypad +

Vk_multiply (107)

Small keyboard-

Vk_subtract (109)

Keypad/

Vk_divide (111)

Pause Break key

Vk_pause (19)

Scroll Lock key

Vk_scroll (145)

Chr () and ASCII () functions in Oracle (attached: characters commonly used and ASCII table)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.