Is it possible to modify the Data type of a column which has at least one data in it?If it is possible,then what will happen to the data in the column?
Example. Table Name: Emp
EmpName | Salary
Smith | 10000
The above table is with 'Char' as datatype for the column 'EmpName' and 'INT' for column 'Salary'
ALTER TABLE Emp ALTER COLUMN EmpName INT;
Is it possible to modify the above table like this?If this is a valid query, then what will happen to the data 'Smith'?
Use the following query:
ALTER TABLE Emp MODIFY EmpName int(255);