Rebuild tables without dropping

2

I have a table already populated. In it there is a not null field, which I need to set to null. In graphical mode does not accept and says that I have to re-create the table. Is there any way I can do this without having to drop the table and still keep the data? Is there any way for this?

    
asked by anonymous 04.02.2015 / 13:28

2 answers

6

Run a query to change the table:

ALTER TABLE [table-name] ALTER COLUMN [column-name] [type] NULL
    
04.02.2015 / 13:32
5

Unfortunately not. But you can in: Ferramentas > Opções > Designers Then clear the option: Evitar salvas alterações que exijam recriação de tabela

In this way the Sql Manager will create a new temporary table, move the data to it, drop the old one and rename the temporary to the definitive name.

    
04.02.2015 / 13:33