We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent dbbc32e commit cd70a1fCopy full SHA for cd70a1f
docs/4-language-usage/2-variables-and-types/3-character-data-types/g-2310.md
@@ -1,6 +1,6 @@
1
# G-2310: Avoid using CHAR data type.
2
3
-!!! warning "Major"
+!!! bug "Blocker"
4
Reliability
5
6
## Reason
@@ -17,6 +17,26 @@ end types_up;
17
/
18
```
19
20
+Unexpected trailing spaces can lead to wrong results.
21
+
22
+```sql
23
+with
24
+ dept as (
25
+ select cast(department_name as varchar2(30 char)) as dname_vc2
26
+ ,cast(department_name as char(30 char)) as dname_char
27
+ from departments
28
+ )
29
+select count(*)
30
+ from dept
31
+ where dname_vc2 = dname_char;
32
+```
33
34
35
+ COUNT(*)
36
+----------
37
+ 0
38
39
40
## Example (good)
41
42
``` sql
0 commit comments