Is there a way to change a column property in a table without having to delete the entire table?
-
I have a database that holds information including isbn numbers for books. I discovered that the isbn is not specifically a 10 digit number it can actually have a character in it so i need to change it to an nvarchar but when i try to do so it says i can't that the table needs to be dropped. Surely I don't have to delete the table and reenter thousands or records just to change that property or do I? Please help thanks.
-
I have a database that holds information including isbn numbers for books. I discovered that the isbn is not specifically a 10 digit number it can actually have a character in it so i need to change it to an nvarchar but when i try to do so it says i can't that the table needs to be dropped. Surely I don't have to delete the table and reenter thousands or records just to change that property or do I? Please help thanks.
if you can't change a field, perform these steps: - add new field (with a new name) - copy data from old to new field - delete old field - optional: rename new field You can perform these interactively, using SQL Sever Management Studio, PHPmyAdmin, or whatever fits your database. :)
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]
I only read code that is properly formatted, adding PRE tags is the easiest way to obtain that.
-
if you can't change a field, perform these steps: - add new field (with a new name) - copy data from old to new field - delete old field - optional: rename new field You can perform these interactively, using SQL Sever Management Studio, PHPmyAdmin, or whatever fits your database. :)
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]
I only read code that is properly formatted, adding PRE tags is the easiest way to obtain that.
wow that worked perfectly. Luc i can't thank you and the other's enough for all your help you have given me. Hopefully one day I will be able to help others and return the favor in which you have given me. Thanks again.
-
wow that worked perfectly. Luc i can't thank you and the other's enough for all your help you have given me. Hopefully one day I will be able to help others and return the favor in which you have given me. Thanks again.
Someday saying thank you... that rated a 5!