Change column restrictions.....

Change column restrictions.....

Post by Dominique Loui » Thu, 10 Feb 2000 04:00:00



Hi all,
  I am using SQL 2000 and was wondering what keywords must I use in the
ALTER TABLE directive to change the restriction on a table column from
NULLABLE to NOT NULLABLE or visa versa. ie. field is defined as Name
varchar(30) NOT NULL; and I would like to change it so that it now
allows NULLs. How can I achieve this withour dropping the column and
adding it again. I was told that with SQL 7 there was a MODIFY keyword
but this does not seem to work with SQL 2000 or maybe my SQL statement
is wrong. Any enlightenment greatly appreciated.

Dominqiue Louis
http://www.SavageSoftware.com.au/delphi/

 
 
 

Change column restrictions.....

Post by Bill Bac » Sat, 12 Feb 2000 04:00:00


I believe that you can use the PCC to make the change.  However, remember to
go to Tools/Properties and make sure that the Table Link Mode is checked --
this will update your Btrieve files at the same time as it changes your
DDF's.

Of course, have a full backup before trying this!
    Bill Bach
    Goldstar Software Inc.


Quote:>   I am using SQL 2000 and was wondering what keywords must I use in the
> ALTER TABLE directive to change the restriction on a table column from
> NULLABLE to NOT NULLABLE or visa versa. ie. field is defined as Name
> varchar(30) NOT NULL; and I would like to change it so that it now
> allows NULLs. How can I achieve this withour dropping the column and
> adding it again. I was told that with SQL 7 there was a MODIFY keyword
> but this does not seem to work with SQL 2000 or maybe my SQL statement
> is wrong. Any enlightenment greatly appreciated.


 
 
 

Change column restrictions.....

Post by Dominique Loui » Sun, 13 Feb 2000 04:00:00



> I believe that you can use the PCC to make the change.  However, remember to
> go to Tools/Properties and make sure that the Table Link Mode is checked --
> this will update your Btrieve files at the same time as it changes your
> DDF's.

> Of course, have a full backup before trying this!
>     Bill Bach
>     Goldstar Software Inc.


Sorry bill maybe I should have been a bit more specifc. I was hoping to be
able to achieve this using SQL code rather than the PCC.

--
Ciao,

Dominique Louis
Delphi Developer and aspiring Delphi Game Developer.
*********************************************************
**  To Do Nothing is to Collaborate with the oppressor **
**  -------------------------------------------------- **
**           I like my reality undiluted!              **
*********************************************************
=========================================================
From . . . . . . . : Dominique Louis

Company. . . . . . : Savage Software Solutions
Web Site . . . . . : http://www.SavageSoftware.com.au
Delphi Games Site. : http://www.SavageSoftware.com.au/delphi
G4D Mirrror Site . : http://www.SavageSoftware.com.au/delphi/g4d
Delphi JEDI Site . : http://www.delphi-jedi.org
=========================================================

 
 
 

Change column restrictions.....

Post by Dominique Loui » Mon, 14 Feb 2000 04:00:00



> I believe that you can use the PCC to make the change.  However, remember to
> go to Tools/Properties and make sure that the Table Link Mode is checked --
> this will update your Btrieve files at the same time as it changes your
> DDF's.

> Of course, have a full backup before trying this!

Hi Bill,
Sorry , maybe I should have been a bit more specifc. I was hoping to be
able to achieve this using SQL code rather than the PCC.

--
Ciao,

Dominique Louis
Delphi Developer and aspiring Delphi Game Developer.
*********************************************************
**  To Do Nothing is to Collaborate with the oppressor **
**  -------------------------------------------------- **
**           I like my reality undiluted!              **
*********************************************************
=========================================================
From . . . . . . . : Dominique Louis

Company. . . . . . : Savage Software Solutions
Web Site . . . . . : http://www.SavageSoftware.com.au
Delphi Games Site. : http://www.SavageSoftware.com.au/delphi
G4D Mirrror Site . : http://www.SavageSoftware.com.au/delphi/g4d
Delphi JEDI Site . : http://www.delphi-jedi.org
=========================================================

 
 
 

1. When did 8 character username restriction change?

Hi all,

I'm trying to figure out when usernames/userid's where allowed to be
longer than eight characters.

In 7.12 (yeah, I know that's old), I used to get good old -576 errors
if I tried to use ids longer than 8 characters.  Now, in IFS2000, I
can go crazy (e.g. I have a used "bloodylongusername" successfully.)

Does anyone know when (i.e. what version) the limit was
removed/increased?

Ciao
Fuzzy
#;-)

2. Oracle Manufacturing Developer, NJ

3. T-SQL Column Name Restrictions?

4. ORA-01376 Error?

5. Column restriction

6. HELP WITH JULIAN DATES

7. DELETE and COLUMN SAME TABLE REFERENCE restriction

8. need patch for foxpro 2.5

9. Restriction on some column values in some rows

10. SQL7 # of columns restriction?

11. T-SQL Column Name Restrictions?

12. Triggers, Mutating Tables & Column Restrictions

13. NOT NULL restriction and CHECK constraint on same column in 7.3.4