Einzelnen Beitrag anzeigen

Monday

Registriert seit: 24. Aug 2012
103 Beiträge
 
FreePascal / Lazarus
 
#1

Firebird Blob Sub_type text kein primary key möglich?

  Alt 5. Jul 2022, 11:59
Datenbank: Firebird • Version: 3/4 • Zugriff über: -
Hallo,

ich lerne mich in Datenbanken ein.

Bei Firebird 4 will ich eine Tabelle anlegen.

Auf ein Feld mit dem Datentyp "blob sub_type text" bzw. "blob sub_type 1" ist es nicht möglich ein Primary key oder unique anzulegen. Habe ich das richtig verstanden? Bei anderen Typen funktioniert es wohl.


Das funktioniert:
Delphi-Quellcode:
create table tabelle (
  a VARCHAR(100) primary key
);
Delphi-Quellcode:
create table tabelle (
  a int not null,
  primary key (a)
);

Das funktioniert nicht:
Delphi-Quellcode:
create table tabelle (
  a blob sub_type text primary key
);
Delphi-Quellcode:
create table tabelle5 (
  a BLOB SUB_TYPE text not null,
  primary key (a)
);
Nur für mein Verständnis.

Ich weiß nicht, warum das nicht funktioniert und ob das so vorgesehen ist oder ein Fehler meinerseits.


Wenn ich einen längeren Text speichern wollte, und nicht blob sub_type text geht wegen primary key, welcher Datentyp ist dann der geeignete?!
  Mit Zitat antworten Zitat