How To/sql-db/

Duplicate and fill table

You may want to drop already existing table:

DROP TABLE items_backup;

Now duplicate structure and copy data from basic table

CREATE TABLE items_backup LIKE items;
INSERT INTO items_backup SELECT * FROM items;

You may want to add primary key:

ALTER TABLE items ADD PRIMARY KEY (item_id [,item_mf_id])

or unique constraint

ALTER TABLE EMPLOYEE ADD CONSTRAINT NEWID UNIQUE(EMPNO,HIREDATE)

and indexes

CREATE UNIQUE INDEX UNIQUE_NAM ON items (item_name)
CREATE INDEX JOB_BY_DPT ON items (item_name, item_category)