Précédent   Forum des professionnels en informatique > Bases de données > Firebird > SQL
SQL Forum d'entraide sur le SQL pour Firebird
Partagez cette discussion sur d'autres réseaux sociaux : Viadeo Twitter Google Facebook Digg Delicious MySpace Yahoo
Réponse Proposer ce sujet en actualité
 
Outils de la discussion
Publicité
'
Vieux 23/12/2002, 00h07   #1
Membre du Club
 
Arnaud GAY
Inscription : mai 2002
Messages : 59
Détails du profil
Informations personnelles :
Nom : Arnaud GAY
Âge : 38
Localisation : Luxembourg

Informations forums :
Inscription : mai 2002
Messages : 59
Points : 43
Points : 43
Par défaut "ALTERER" une col. NULL en NOT NULL - Int

Hug à tous :

Aide dit :

Code :
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
ALTER TABLE TABLE <operation> [, <operation>];
 
<operation> = {ADD <col_def> 
	| ADD <tconstraint>
 
| ALTER [COLUMN] column_name <alt_col_clause>
	| DROP col 
	| DROP CONSTRAINT constraint}
<alt_col_clause> = {TO new_col_name 
	| TYPE new_col_datatype 
	| POSITION new_col_position}
 
<col_def> = col {<datatype> | COMPUTED [BY] (<expr>) | domain}
	[DEFAULT {literal | NULL | USER}]
	[NOT NULL] 
	[<col_constraint>]
...
=> Donc il semble impossible via commande ALTER de transformer un champ en NOT NULL (sauf en ajoutant un champ temporaire, en coppiant les données, en supprimant le champ initial et en renommant le champ temporaire...??)
Confirmation ??
Merci
__________________
Le nom d'un bomerang qui ne revient pas quand on le lance ?
Un Baton...
Gandalf24 est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 23/12/2002, 22h28   #2
Membre éprouvé
 
Inscription : mars 2002
Messages : 516
Détails du profil
Informations forums :
Inscription : mars 2002
Messages : 516
Points : 483
Points : 483
Envoyer un message via MSN à Sylvain James
update RDB$RELATION_FIELDS set
RDB$NULL_FLAG = 1
where (RDB$FIELD_NAME = 'ton champ') and
(RDB$RELATION_NAME = 'ta table')

Sylvain
__________________
.NET / ASP.NET MVC / Delphi / XMLRAD / XSL / Technos Web

Mon Blog : http://blog.developpez.com/index.php?blog=89
Mes Articles : http://sjames.developpez.com/
Rubrique XMLRAD: http://xmlrad.developpez.com
Sylvain James est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 28/12/2002, 00h07   #3
Membre du Club
 
Arnaud GAY
Inscription : mai 2002
Messages : 59
Détails du profil
Informations personnelles :
Nom : Arnaud GAY
Âge : 38
Localisation : Luxembourg

Informations forums :
Inscription : mai 2002
Messages : 59
Points : 43
Points : 43
Cool, ca marche
merci

a+
__________________
Le nom d'un bomerang qui ne revient pas quand on le lance ?
Un Baton...
Gandalf24 est déconnecté   Envoyer un message privé Réponse avec citation 00
Réponse Proposer ce sujet en actualité Cette discussion est résolue.
Outils de la discussion



Fuseau horaire GMT +2. Il est actuellement 23h46.


 
 
 
 
Partenaires

Hébergement Web