databasefirebirdcreate-table

How to declare a field as varchar(max) in Firebird


How can I declare this table with varchar(max) in Firebird?

CREATE TABLE MyUser
(
Id   INT,   -- unique id of user
Signature   VARCHAR(max),  
Login   VARCHAR(50),   
UserPassword   VARCHAR(100),    
CONSTRAINT PK_MyUser PRIMARY KEY (Id) 
);
COMMIT;

Is it possible?


Solution

  • Firebird doesn't have a type VARCHAR(MAX). You either need to use VARCHAR(32765) assuming you are using a 1-byte character-set or VARCHAR(8191) (with UTF-8), or you need to use a BLOB SUB_TYPE TEXT (which is a blob type for text data).