Top "Alter" questions

'alter' is a SQL keyword used to change or modify the table structure or the records in a table.

How to change column datatype in SQL database without losing data

I have SQL Server database and I just realized that I can change the type of one of the columns …

sql-server sql-server-2008 alter
How to DROP multiple columns with a single ALTER TABLE statement in SQL Server?

I would like to write a single SQL command to drop multiple columns from a single table in one ALTER …

sql sql-server tsql alter
How to remove constraints from my MySQL table?

I want to remove constraints from my table. My query is: ALTER TABLE `tbl_magazine_issue` DROP CONSTRAINT `FK_tbl_…

mysql foreign-keys constraints alter
How to add new column to MYSQL table?

I am trying to add a new column to my MYSQL table using PHP. I am unsure how to alter …

php mysql add alter
How to move columns in a MySQL table?

Currently I am having the following MySQL table: Employees (empID, empName, department); I want to change the table to the …

mysql sql alter
Hive Alter table change Column Name

I am trying to rename a columnName in Hive. Is there a way to rename column name in Hive . tableA (…

hive alter-table alter
Alter SQL table - allow NULL column value

Initially, the table "MyTable" has been defined in the following way: CREATE TABLE IF NOT EXISTS `MyTable` ( `Col1` smallint(6) NOT …

mysql sql alter
Difference between Alter and Update SQL

I am busy studying MySQL and I understand that update is used to update a record or row in a …

sql sql-update alter
SQL Server: how to write an alter index statement to add a column to the unique index?

I have a UNIQUE, NON CLUSTERED index on a table that is currently using 4 columns for the index. I want …

sql-server-2005 indexing alter
How to add new column in existing View in SQL-Server 2014 using Alter

I have created a view that is based on another view and a table. I want to add new column …

sql sql-server view alter