View previous topic :: View next topic
|
Author |
Message |
ursprasanna Warnings : 2 New User
Joined: 15 May 2006 Posts: 20 Location: chennai
|
|
|
|
I would like to know whether the size of the column be changed . if so how that can be achieved .
if not atleast the character type can be changed or not.
Thanks,
Prasanna Subramaniam. |
|
Back to top |
|
|
priyesh.agrawal
Senior Member
Joined: 28 Mar 2005 Posts: 1448 Location: Chicago, IL
|
|
|
|
I think its NO... you may want to create a new table with updated structure and copy as per need. |
|
Back to top |
|
|
sachina2z
New User
Joined: 03 May 2006 Posts: 8 Location: Pune, India
|
|
|
|
I hope the following command will solve your problem.
ALTER TABLE table_name
MODIFY column_name column_type;
For example:
ALTER TABLE supplier
MODIFY student_name varchar2(50) not null;
It will modify the column called student_name to be a data type of varchar2(50) and force the column to not allow null values.
Reply me if it works. |
|
Back to top |
|
|
priyesh.agrawal
Senior Member
Joined: 28 Mar 2005 Posts: 1448 Location: Chicago, IL
|
|
|
|
Prasanna,
What is your column data type and what version of DB2 u r using.
you want to increase the length or decrease ? |
|
Back to top |
|
|
ursprasanna Warnings : 2 New User
Joined: 15 May 2006 Posts: 20 Location: chennai
|
|
|
|
Priyesh,
The column data type is character and i am not clear about the version of DB2 which i am using.
The date base is going for an expansion so the the length of the data type has to be increased.
Thanks,
Prasanna Subramaniam. |
|
Back to top |
|
|
Gurmeet
New User
Joined: 22 Feb 2006 Posts: 46 Location: Pune
|
|
Back to top |
|
|
Gurmeet
New User
Joined: 22 Feb 2006 Posts: 46 Location: Pune
|
|
Back to top |
|
|
|