Oct 8, 2003 #1 sssdexter Programmer Oct 7, 2003 29 MY Hi, How can i modify the datatype? For example i like to change student_id from varchar(4) to varchar(8)? Thanks a lot
Hi, How can i modify the datatype? For example i like to change student_id from varchar(4) to varchar(8)? Thanks a lot
Oct 8, 2003 #2 LakshmiKiran Programmer Jul 1, 2003 22 IN Hi, This is how you do.. alter table tablename alter column student_id varchar(8) But you cannot set it to lesser length than already present. Upvote 0 Downvote
Hi, This is how you do.. alter table tablename alter column student_id varchar(8) But you cannot set it to lesser length than already present.
Oct 8, 2003 #3 JamesLean Programmer Dec 13, 2002 3,059 GB FYI, you can actually set the length to less than any existing data by using SET ANSI_WARNINGS OFF for the connection. Obviously this will cut off the end of any data that is longer than the new length, so you probably don't want to do this. --James Upvote 0 Downvote
FYI, you can actually set the length to less than any existing data by using SET ANSI_WARNINGS OFF for the connection. Obviously this will cut off the end of any data that is longer than the new length, so you probably don't want to do this. --James