Usenet.com

www.Usenet.com

Group Index

Comp Thread Archive from Usenet.com

<-- __Chronological__ --> <-- __Thread__ -->

Re: Addition of constraint during creation of table



reference the CREATE TABLE statement in the SQL manual for the 2 possible
syntaxes -- one of which is very similar to the alter table add constraint
syntax

also look into options such as DISABLED

also be ready for some strong opinions on whether you should include the
constraints in the CREATE TABLE

-- Mark Stock

"ponnurangam k" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
| Hi All,
|
| I have few tables (abc, def) with with a specific structure and I need
| to add constratint to the table I do it with
|
| alter table abc
| add constraint abc_columnname_fk
| foreign key (columnname) references dec(columnname);
|
| But my question is how to create a table with this constraint embedded
| in the create table statement itself ? same, as in
|
| CREATE TABLE abc
| (columna PRIMARY KEY,
| Column2 CHAR(50) ???????????? );
|
| Can I embed the constraint during creation of the table only ?
|
| Can somebody please throw light or solution
|
| I am stuck with this problem.
|
| Thanks in advance,,
|
| PK





<-- __Chronological__ --> <-- __Thread__ -->


Usenet.com



Please check out one of the premium Usenet Newsgroup Service Providers below for access to Usenet.