473,398 Members | 2,125 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,398 software developers and data experts.

alter column(from null to not null) in DB2 v8.x.x

As captioned question, i would like to how to alter the column from
null to not null?
Thanks

Mar 22 '07 #1
2 15737
si*****@gmail.com wrote:
As captioned question, i would like to how to alter the column from
null to not null?
In V9:

ALTER TABLE ... ALTER COLUMN ... SET NOT NULL

V8 doesn't support this statement, so you would have to drop and re-create
the table. DB2 Control Center has some support for that.

--
Knut Stolze
DB2 z/OS Utilities Development
IBM Germany
Mar 22 '07 #2
On Thu, 22 Mar 2007 14:31:36 +0100, Knut Stolze <st****@de.ibm.com>
wrote:
>si*****@gmail.com wrote:
>As captioned question, i would like to how to alter the column from
null to not null?

In V9:

ALTER TABLE ... ALTER COLUMN ... SET NOT NULL

V8 doesn't support this statement, so you would have to drop and re-create
the table. DB2 Control Center has some support for that.
Of course, he could just ADD a CONSTRAINT manually CHECKing for NOT
NULL.

B.
Mar 22 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: uw_badgers | last post by:
Is it possible to create a unique constraint to a column from another table? For example: tb_current: current_names -------------- aaa bbb tb_new:
1
by: Tilmann | last post by:
I'm currently using UDB 7.2 on WIN 2000 and also DB2 Version 7 on z/OS. I have one table with a column defined as NOT NULL. I had to change this column from NOT NULL to NULL. Is there any better...
1
by: macupryk | last post by:
I am not sure how to get a column from a datatable, I cannot use foreach. DataColumn dataColumn = DataColumn TEXTDT.Columns.ColumnName.Trim(); if (rows < TEXTDT.Rows.Count) // this will...
0
by: Problematic coder | last post by:
Hi, I have just been asked to create an app that will import a specific column from an excel spreadsheet, something like sheet1 columnD or a column with the first row with a value of 'ID'...
2
by: Problematic coder | last post by:
Hi, I have just been asked to create an app that will import a specific column from an excel spreadsheet, something like sheet1 columnD or a column with the first row with a value of 'ID'...
2
by: Rahul B | last post by:
Hi, I dropped a not null column from a table. After that i reorganized the table. However, an update statement is giving error like "(Reason "column number out of range".) SQLSTATE=58004" ...
2
by: anonymoushamster | last post by:
Dropdown A is column from database Dropdown B is column from database Data in A and B must be from same row. If user click an item from A, then B is updated to display its data from...
7
by: cesco | last post by:
Hi, I have a file containing four columns of data separated by tabs (\t) and I'd like to read a specific column from it (say the third). Is there any simple way to do this in Python? I've...
7
by: himanshupancholi | last post by:
Hi, I need to Copy all values of a column from one table to another. Below are the details: Source: STL_GRP table, VEND column Destination PARTNER table, VEND column. I am using the below...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.