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).

SQL Server - script to update database columns from varchar to nvarchar if not already nvarchar

I am in a situation where I must update an existing database structure from varchar to nvarchar using a script. …

sql-server alter-table
Sybase/ALTER TABLE: how to turn an existing column from non-nullable to nullable?

Hopefully the title has made it quite clear. I would like to see an example of a alter table statement …

sybase alter-table
SQL Server alter database with rollback immediate

Sometimes when (for example) setting a database offline by executing the following command, an exception will be thrown, because one …

sql-server rollback alter-table
Change column type from timestamp WITHOUT time zone to timestamp WITH time zone

I found this ALTER COLUMN statement in the PostgreSQL 9.3 ALTER TABLE manual page: ALTER TABLE audits ALTER COLUMN created_at …

sql postgresql timezone ddl alter-table
SQL SET DEFAULT not working in MS Access

Possible Duplicate: DEFAULT clause in ALTER TABLE statement resulting in syntax error I am trying to execute the following statement …

sql ms-access default alter-table alter-column
alter table drop column syntax error using sqlite

This is the schema of my table: create table LPCG(ID integer primary key, PCG text, Desc text, test text); …

sqlite primary-key alter-table
Convert postgresql column from character varying to integer

I'm trying to change a column type from "character varying(15)" to an integer. If I run "=#SELECT columnX from tableY …

postgresql alter-table psql alter-column
MySQL - Duplicate entry error when trying to add new column

I have a MySQL database with a table that has 2 million rows using innodb engine. I want to add another …

mysql alter-table
Rename Oracle table

What is the difference between ALTER TABLE RENAME statement and RENAME TABLE statement. ie, between Alter table old_table_name …

sql oracle oracle11g alter-table table-rename