select RDB$RELATION_NAME F from RDB$RELATIONS where RDB$RELATION_NAME = 
'RDB$RELATIONS'
---
1 record, F = 'RDB$RELATIONS                                                 ';


select RDB$RELATION_NAME F from RDB$RELATIONS where RDB$RELATION_NAME like 
'RDB$RELATIONS%'
---
1 record


select RDB$RELATION_NAME F from RDB$RELATIONS where RDB$RELATION_NAME like 
'RDB$RELATIONS'
---
0 records 


select RDB$RELATION_NAME F from RDB$RELATIONS where trim(RDB$RELATION_NAME) 
like 'RDB$RELATIONS'
---
1 record


select RDB$RELATION_NAME F from RDB$RELATIONS where RDB$RELATION_NAME like 
'RDB$RELATIONS   %'
---
1 record


1. CHAR(N) is useful in some scenarios.
2. CHAR(N) is confusing when working with database metadata. VARCHAR(N) is more 
user-friendly.



Вы писали 28 апреля 2018 г., 16:22:01:

> For example:

> CREATE TABLE SEC$USERS (
>     SEC$USER_NAME    CHAR(63),
>     SEC$FIRST_NAME   SEC$NAME_PART /* SEC$NAME_PART = VARCHAR(32) NOT NULL */,
>     SEC$MIDDLE_NAME  SEC$NAME_PART /* SEC$NAME_PART = VARCHAR(32) NOT NULL */,
>     SEC$LAST_NAME    SEC$NAME_PART /* SEC$NAME_PART = VARCHAR(32) NOT NULL */,
>     SEC$ACTIVE       BOOLEAN,
>     SEC$ADMIN        BOOLEAN,
>     SEC$DESCRIPTION  BLOB SUB_TYPE 1 SEGMENT SIZE 80,
>     SEC$PLUGIN       CHAR(63)
> );

> Why not VARCHAR?
> Now all users of this fields must remove trailing spaces manually.


> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> Firebird-Devel mailing list, web interface at
> https://lists.sourceforge.net/lists/listinfo/firebird-devel


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel

Reply via email to