Quantcast
Channel: IBM Mainframe Computers Forums
Viewing all articles
Browse latest Browse all 8500

DB2 :: Converting NULL column into NOT NULL using ALTER statement

$
0
0
Author: Raghu navaikulam
Subject: Converting NULL column into NOT NULL using ALTER statement
Posted: Sat Aug 06, 2016 3:45 pm (GMT 5.5)

Hi all,

Is there any provision to convert a NULL column into a NOT NULL column which is having data in it?

I tried many options, but went in vain.

ALTER TABLE table1 ALTER COLUMN t1 SET DATA TYPE CHAR(6) NOT NULL;

ALTER TABLE table1 ALTER COLUMN t1 SET NOT NULL;


All are went in vain.
Any help or a clue is appreciated.

Thanks in advance
Raghu


Viewing all articles
Browse latest Browse all 8500

Trending Articles