Search notes:

Oracle data type CHAR

Comparison

Values whose types are CHAR are compared by trimming white spaces from their right side.
create table tq84_char (
   id integer,
   txt char(10) unique
);
Two records are inserted. Note the trailing spaces in the value of def:
insert into tq84_char values (1, 'abc'    );
insert into tq84_char values (2, 'def    ');
The following statement throws ORA-00001: unique constraint (‥) violated:
insert into tq84_char values (3, 'abc    ');
The following three select statements return one record each:
select id from tq84_char where txt = 'abc'    ;
select id from tq84_char where txt = 'abc    ';
select id from tq84_char where txt = 'def '   ;
This statemnt does not return a record:
select id from tq84_char where txt = ' def'   ;
drop table tq84_char purge;

See also

The columns CHAR_LENGTH and CHAR_USED in dba_tab_columns and dba_tab_cols.
The SQL function chr.
nls_characterset defines the character set for char values.
datatypes

Index

Fatal error: Uncaught PDOException: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php:78 Stack trace: #0 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(78): PDOStatement->execute(Array) #1 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(30): insert_webrequest_('/notes/developm...', 1747730286, '3.142.120.72', 'Mozilla/5.0 App...', NULL) #2 /home/httpd/vhosts/renenyffenegger.ch/httpsdocs/notes/development/databases/Oracle/SQL/data-types/char/index(76): insert_webrequest() #3 {main} thrown in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php on line 78