I've the following column
hits text NOT NULL
and want to alter it to
hits bigint(20) unsigned NOT NULL default '0'
how to use ALTER TABLE commands to do this change ! ~ thanks
Change data types in Datasheet view Select the field (the column) that you want to change. On the Fields tab, in the Properties group, click the arrow in the drop-down list next to Data Type, and then select a data type. Save your changes.
You can modify the data type of a column in SQL Server by using SQL Server Management Studio or Transact-SQL. Modifying the data type of a column that already contains data can result in the permanent loss of data when the existing data is converted to the new type.
The ALTER COLUMN command is used to change the data type of a column in a table.
ALTER TABLE table_name MODIFY hits bigint(20) unsigned NOT NULL default '0';
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With