34 lines
578 B
MySQL
34 lines
578 B
MySQL
|
-- Place your SQL code here
|
||
|
|
||
|
USE vn;
|
||
|
|
||
|
ALTER TABLE vn.collectionColors ADD rgb char(7) DEFAULT NULL NULL;
|
||
|
|
||
|
ALTER TABLE vn.collectionColors ADD CONSTRAINT collectionColors_UN UNIQUE KEY (shelve,wagon,trainFk);
|
||
|
|
||
|
UPDATE vn.collectionColors
|
||
|
SET rgb='#ff0000'
|
||
|
WHERE id=1;
|
||
|
|
||
|
UPDATE vn.collectionColors
|
||
|
SET rgb='#ffce30'
|
||
|
WHERE id=2;
|
||
|
|
||
|
UPDATE vn.collectionColors
|
||
|
SET rgb='#008000'
|
||
|
WHERE id=3;
|
||
|
|
||
|
UPDATE vn.collectionColors
|
||
|
SET rgb='#0000ff'
|
||
|
WHERE id=4;
|
||
|
|
||
|
UPDATE vn.collectionColors
|
||
|
SET rgb='#ffffff'
|
||
|
WHERE id=5;
|
||
|
|
||
|
UPDATE vn.collectionColors
|
||
|
SET rgb='#000000'
|
||
|
WHERE id=6;
|
||
|
|
||
|
|