The CHAR data type is used for storing fixed-length character strings.
SQL> --
SQL>
SQL> create table MyTable(
2 bean_name char(50)
3 );
Table created.
SQL>
SQL> insert into MyTable values( 'A ' );
1 row created.
SQL> insert into MyTable values( ' A' );
1 row created.
SQL> insert into MyTable values( 'A' );
1 row created.
SQL>
SQL> select bean_name, length( bean_name )from MyTable;
BEAN_NAME LENGTH(BEAN_NAME)
-------------------------------------------------- -----------------
A 50
A 50
A 50
SQL>
SQL> drop table MyTable;
Table dropped.
SQL>
Related examples in the same category