Trying to find out if the table mytable in the database, the result is empty. There are no query execution errors. There is such a table in the database. Firebird 2.5

 SELECT * FROM RDB$RELATIONS WHERE RDB$RELATION_NAME = 'mytable' 
  • one
    And you gave this query without the where clause and made sure that the table is not only there, but also written in the same letters (and not large for example) - Mike
  • Excerpt from the documentation: The following names are the same from the point of view of the system: fullname FULLNAME FuLlNaMe FullName - Dmitry Nail
  • one
    Recheck the case of the table name. If create table mytable was without quotes, the table MYTABLE was created - vp_arth
  • Yes, from the point of view of the system, the names are the same, because the system leads them to the same register before searching for names, and usually this is the upper case. so you must do the same when searching - Mike

1 answer 1

The following names from the point of view of the system are the same:

fullname FULLNAME FuLlNaMe FullName

In fact, this means only that the table FULLNAME will be created.

It is still possible to create the fullName table using the so-called <delimited name> :

 create table "fullName" 

Because The RDB$RELATION_NAME field of the RDB$RELATION_NAME system table has case-sensitive collation — you must specify the correct register of the table name when searching (or result in a case-insensitive collate before comparison).

 SELECT * FROM RDB$RELATIONS WHERE RDB$RELATION_NAME = 'MYTABLE'; SELECT * FROM RDB$RELATIONS WHERE RDB$RELATION_NAME = upper('mytable'); SELECT * FROM RDB$RELATIONS WHERE upper(RDB$RELATION_NAME) = upper('mytable'); -- также найдёт "myTable"