How do I add new column with no fields generated? It would be a new column added without the rows. I don't want NULL or empty values...
Is that possible?
This will create NULL values:
$sql = "ALTER TABLE translation ADD new_column VARCHAR( 255 )";
You can use either "not null" or "default" thingie. Or them both.
ALTER TABLE `translation `
ADD COLUMN `new_column` VARCHAR(45) NOT NULL DEFAULT '1234' AFTER `courier_id`;
"NOT NULL" will prevent the column of having null state ever, and the "DEFAULT" will set a default value.
TRUNCATE translationwill help, but that's probably not what you want (please don't do that on live data). You can't add a column to a table without 'rows'. If you add a column to a table all existing rows will get the default value for that column (eitherNULL,''or something else). In most situationsNULLmeans 'no value', so live with that or go with a 1:1 table as fmgonzalez suggested.