Kopieren Sie Spaltendaten in eine andere Spalte SQL mit Erstellen von Schnecken
## Add New Column then UPDATE Old Table Data to New table with Slug type
## Syntax
ALTER TABLE `tblname` ADD `column_slug` VARCHAR(255) NOT NULL AFTER `column_name`;
UPDATE `tblname` SET `column_slug` = replace(lower(column_name), ' ', '-');
## Example
ALTER TABLE `product` ADD `product_slug` VARCHAR(255) NOT NULL AFTER `productname`;
UPDATE `product` SET `product_slug` = replace(lower(productname), ' ', '-');
Mr. Samy