Top "Alter" questions

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

Adding a Boolean column into an existing table

I'm trying to add a boolean column into an existing table alter table chatuser add activerecord bool; alter table chatuser …

mysql alter
How can I alter this computed column in SQL Server 2008?

I have a computed column created with the following line: alter table tbPedidos add restricoes as (cast(case when restricaoLicenca = 1 …

sql sql-server-2008 edit alter calculated-columns
How do I alter a mysql table column defaults?

I have a table with a column of type timestamp which defaults current_timestamp and updates to current_timestamp on …

mysql database timestamp alter
Trying to modify a constraint in PostgreSQL

I have checked the documentation provided by Oracle and found a way to modify a constraint without dropping the table. …

sql postgresql alter
How to add a column to a table from another table in Mysql?

I have two tables table1 table2 Tabel1 contains 2 columns id Name Tabel2 contains 2 columns id Age A want to add …

mysql sql select sql-update alter
ALTER TABLE ADD COLUMN takes a long time

I was just trying to add a column called "location" to a table (main_table) in a database. The command …

mysql performance alter
Updating integer column with null values in postgres

I would like to update my column with other column in other table. Before doing so, I would like to …

postgresql null sql-update alter
Make a column nullable in DB2 when Data Capture is enabled

I'm using db2 version 9.7* and it seems impossible to make a NOT NULL column nullable in any straightforward way. Unfortunately …

db2 nullable alter non-nullable notnull
How to change all the tables in my database to UTF8 character set?

My database is not in UTF8, and I'd like to convert all the tables to UTF8, how can I do …

mysql utf-8 collation alter
Alter column set not null fails

Consider the following table with approximately 10M rows CREATE TABLE user ( id bigint NOT NULL, ... CONSTRAINT user_pk PRIMARY KEY (…

postgresql alter notnull enterprisedb