Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Datenbanken (https://www.delphipraxis.net/15-datenbanken/)
-   -   Firebird 3.0 RDB$RELATION_FIELDS Update (https://www.delphipraxis.net/191043-firebird-3-0-rdb%24relation_fields-update.html)

stalkingwolf 1. Dez 2016 16:24

Datenbank: Firebird • Version: 3.0 • Zugriff über: Flamerobin

Firebird 3.0 RDB$RELATION_FIELDS Update
 
Auszug aus der Firebird FAQ
Zitat:

2. If is also possible with a simple system-tables change. While toying with system tables is usually not a good idea, changing the NULL option for a column is a common task, and this has been tested by many users for many years - as all admin tools do it that way:

UPDATE RDB$RELATION_FIELDS SET RDB$NULL_FLAG = 1
WHERE RDB$FIELD_NAME = 'C1' AND RDB$RELATION_NAME = 'T1';


To change from NOT NULL to NULL, use this:

UPDATE RDB$RELATION_FIELDS SET RDB$NULL_FLAG = NULL
WHERE RDB$FIELD_NAME = 'C1' AND RDB$RELATION_NAME = 'T1';
Das geht ja nun in Firebird 3 nicht mehr.
Wie wäre nun der korrekte Weg, wenn man dies nachträglich auf ein Feld aktualisieren möchte?

tsteinmaurer 1. Dez 2016 19:33

AW: Firebird 3.0 RDB$RELATION_FIELDS Update
 
Firebird 3.0.1 Release Notes S. 70:
Code:
ALTER TABLE <table name> ALTER <field name> { DROP | SET } [NOT] NULL
ALTER DOMAIN <domain name> { DROP | SET } [NOT] NULL

stalkingwolf 2. Dez 2016 07:22

AW: Firebird 3.0 RDB$RELATION_FIELDS Update
 
Ok das haben sie hinzugefügt.
Danke.


Alle Zeitangaben in WEZ +1. Es ist jetzt 01:53 Uhr.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz