Table car:
id INT NOT NULL AUTO_INCREMENT KEY,
brand CHAR(50) NOT NULL UNIQUE
owner CHAR(50) NOT NULL DEFAULT ''
Then you can have the view like this one:
mysql> CREATE VIEW v_car
AS SELECT * FROM carmysql> CREATE VIEW v_car
AS SELECT DISTINCT(owner) FROM carmysql> CREATE VIEW v_car (nama, pemilik)
AS SELECT brand, owner FROM car
No comments:
Post a Comment