下記、VIEWが実行できないのですが、何が悪いのでしょうか。
お分かりになる方、教えていただけますか。
エラー内容
” SQL : 列"hanbai_tanka"が複数指定されました ”
CREATE VIEW ViewRenshu5_1 (shohin_mei, hanbai_tanka, torokubi) AS SELECT * FROM Shohin WHERE hanbai_tanka >= 1000 AND torokubi = '2009-9-20'; --ソースもとになるコード create table "public".shohin ( shohin_id character(4) not null , shohin_mei character varying(100) not null , shohin_bunrui character varying(32) not null , hanbai_tanka integer , shiire_tanka integer , torokubi date , shohin_mei_kana character varying(100) , primary key (shohin_id) ); comment on table shohin is 'shohin'; comment on column shohin.shohin_id is 'shohin_id'; comment on column shohin.shohin_mei is 'shohin_mei'; comment on column shohin.shohin_bunrui is 'shohin_bunrui'; comment on column shohin.hanbai_tanka is 'hanbai_tanka'; comment on column shohin.shiire_tanka is 'shiire_tanka'; comment on column shohin.torokubi is 'torokubi'; comment on column shohin.shohin_mei_kana is 'shohin_mei_kana'; INSERT INTO Shohin VALUES ('001', 'Tシャツ', '衣服',1000、500、'2009-09-20'); INSERT INTO Shohin VALUES ('002', '穴あけパンチ', '事務用品',500、320、'2009-09-11'); INSERT INTO Shohin VALUES ('003', 'カッターシャツ', '衣服',4000、2800、NULL); INSERT INTO Shohin VALUES ('004', '包丁', 'キッチン用品',3000、2800、'2009-09-20'); INSERT INTO Shohin VALUES ('005', '圧力鍋', 'キッチン用品',6800、5000、'2009-01-15'); INSERT INTO Shohin VALUES ('006', 'フォーク', 'キッチン用品',500、NULL、'2009-09-20'); INSERT INTO Shohin VALUES ('007', 'おろしがね', 'キッチン用品',880、790、'2008-04-28'); INSERT INTO Shohin VALUES ('008', 'ボールペン', '事務用品',100、NULL、'2009-11-11'); コード
回答1件
あなたの回答
tips
プレビュー