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

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

$
0
0
Author: Raghu navaikulam
Subject: Reply to: Converting NULL column into NOT NULL using ALTER statement
Posted: Tue Aug 09, 2016 3:16 pm (GMT 5.5)

@Rohit

Thanks for your hind.
I did it.

Quote:
CREATE UNIQUE INDEX ALTNDEX ON ALTER_EMP(EMPNO);
ALTER TABLE ALTER_EMP ADD PRIMARY KEY(EMPNO);


The table was created using LIKE verb. So no contraints were created.

Now the table is not accepting any duplicate rows as well as not accepting NULL values in the indexed column.

Thanks agin for your hint.

Regards
Raghuanthan


Viewing all articles
Browse latest Browse all 8500

Trending Articles