Top "Alter-table" questions

The "ALTER TABLE" is a SQL statement that allows you to make schema changes to a database table (i.e. add, drop or alter columns from an existing table).

Adding column between two other columns in SQL server

Can you add a column to a table inserting it in between two existing columns in SQL Server without dropping …

sql-server alter-table
Right click script alter table disabled in SQL Server Management Studio

I want to script a table as Alter to a New Query Editor Window. But this option is disabled. How …

sql-server ssms alter-table
How to add a default value to an already existing column?

I have an existing column in my SQL Server database. I have tried about everything I can think of but …

sql sql-server tsql alter-table default-constraint
Problem with Postgres ALTER TABLE

I have one problem with the ALTER TABLE in postgre. I want to change size of the varchar column. When …

postgresql dependencies alter-table
MySQL - How do I update the decimal column to allow more digits?

I'm a beginner in MySQL, and I accidentally created a table with a column named (price decimal(2,2)); It needs to …

mysql sql-update decimal alter-table
How to change existing column type of a table in Sybase?

I searched for a while and can't get an answer. Why this doesn't work? ALTER TABLE mytable ALTER COLUMN price …

sybase alter-table
MySQL: ALTER IGNORE TABLE ADD UNIQUE, what will be truncated?

I have a table with 4 columns: ID, type, owner, description. ID is AUTO_INCREMENT PRIMARY KEY and now I want …

mysql alter-table unique-key
ALTER TABLE my_table ADD @column INT

If i want to use a variable as name of the new column, is this posible in MS SQL? Example …

sql-server alter-table
Modify column Vs change column

I know, we can not rename a column using modify column syntax,but can change column syntax. My question is: …

mysql alter-table