How to insert a special character in the table of DB2 (1)

zhaozj2021-02-16  46

How to insert special characters in the table of DB2

In the actual use, you may encounter problems to insert special characters in the fields of the table. I have a simple summary, you are welcome to continue, so you can share, discuss together, and travel together! (The following mainly in DB2 7.x as an example).

1. Insert characters '(single quotes) INSERT INTO DB2ADMIN.AAAA VALUES (' ''); INSERT INTO DB2ADMIN.AAAA VALUES ('A' '' 'B'); 2. Insert Character ~ Insert Into DB2ADMIN.AAAA VALUES ('~'); INSERT INTO DB2ADMIN.AAAA Values ​​('a ~ b'); 3. Insert characters! Insert Into db2admin.AAAA Values ​​('!'); Insert Into db2admin.aaa Values ​​('a! B') ; 4. Insert characters @ INSERT INTO DB2ADMIN.AAAA VALUES ('@'); INSERT INTO DB2ADMIN.AAAA VALUES ('a @ b'); 5. Insert Character # Insert Into DB2ADMIN.AAAA VALUES ('#'); Insert INTO DB2ADMIN.AAAA VALUES ('a # b'); 6. Insert Character $ INSERT INTO DB2ADMIN.AAA VALUES ('$'); Insert Into DB2ADMIN.AAAA VALUES ('a $ b'); 7. Insert Character% INSERT INTO DB2ADMIN.AAAA VALUES ('%'); INSERT INTO DB2ADMIN.AAAA VALUES ('a% b'); 8. Insert Character ^ Insert Into DB2ADMIN.AAAA VALUES ('^'); Insert Into DB2ADMIN.AAAA VALUES (' A ^ b '); 9. Insert characters & INSERT INTO DB2ADMIN.AAAA VALUES (' & '); INSERT INTO DB2ADMIN.AAAA VALUES (' A & B '); 10. Insert Character * Insert Into DB2Admin.AAAA VALUES (' * ' ); INSERT INTO DB2ADMIN.AAAA VALUES ('a * b'); 11. Insert characters (Insert Into DB 2Admin.aaa Values ​​('); INSERT INTO DB2ADMIN.AAAA VALUES (' A (B '); 12. Insert Character) Insert Into DB2Admin.AAAA Values ​​(') '); Insert Into DB2ADMIN.AAAA VALUES (' A ) B '); 13. Insert characters _ INSERT INTO DB2ADMIN.AAAA VALUES (' _ '); INSERT INTO DB2ADMIN.AAAA VALUES (' A_B '); 14. Insert Character - Insert Into DB2Admin.AAAA Values ​​(' - ') Insert INTO DB2ADMIN.AAAA VALUES ('A-B'); 15. Insert Character Insert Into DB2ADMIN.AAAA VALUES (' '); Insert Into DB2Admin.AAAA Values

A b '); 16. Insert characters = INSERT INTO DB2ADMIN.AAAA VALUES (' = '); Insert Into db2admin.aaaa Values ​​(' a = b '); 17. Insert Character / Insert Into db2admin.AAAA VALUES (' / '); INSERT INTO DB2ADMIN.AAAA VALUES (' A / B '); 18. Insert Character INSERT INTO DB2ADMIN.AAAA VALUES ('>'); INSERT INTO DB2ADMIN.AAAA VALUES ('a> b'); 20. Insert Character? Insert Into db2admin.aaa Values ​​(''); Insert Into DB2Admin .Aaaa Values ​​('a? B'); 21. Insert characters: INSERT INTO DB2ADMIN.AAAA VALUES (':'); INSERT INTO DB2ADMIN.AAAA VALUES ('a: b'); 22. Insert characters; Insert Into DB2Admin .Aaa values ​​(CHR (59)); INSERT INTO DB2ADMIN.AAAA VALUES (ACHR (59) B); 23. Insert Character 'Insert Into DB2ADMIN.AAAA VALUES (' ''); Insert Into DB2ADMIN.AAAA VALUES (' A '' '' B '); 24. Insert Character` Insert Into DB2ADMIN.AAA Values ​​(' `'); Insert Into DB2ADMIN.AAAA VALUES (' a`b '); 25. Insert Character | Insert Into DB2Admin.AAAA VALUES ('|'); Insert Into db2admin.aaa Values ​​('A | B'); 26. Insert Character / I NSERT INTO DB2ADMIN.AAAA VALUES ('/'); INSERT INTO DB2ADMIN.AAAA VALUES ('A / B');

27. Insert characters {INSERT INTO DB2ADMIN.AAAA VALUES ('{'); INSERT INTO DB2ADMIN.AAAA VALUES ('a {b'); 28. Insert characters} Insert Into db2admin.aaa Values ​​('}'); Insert Into DB2ADMIN.AAAA VALUES ('a} b'); 29. ​​Insert characters [INSERT INTO DB2ADMIN.AAAA VALUES ('['); Insert Into DB2Admin.AAAA Values ​​('a [b'); 30. Insert characters] Insert Into DB2ADMIN.AAAA VALUES (']'); INSERT INTO DB2ADMIN.AAAA VALUES ('a] b');

转载请注明原文地址:https://www.9cbs.com/read-24764.html

New Post(0)