I'm trying to create a new view from an existing table which as 2 columns:
CREATE TABLE writers (
movie_id integer NOT NULL REFERENCES movies,
person_id integer NOT NULL REFERENCES people,
PRIMARY KEY (movie_id,person_id)
) ;
I'm trying to make a view which adds a new column and a default character value so I want a the new to have the columns movie_id, person_id, position_name and I need position_name to be of type character so that I can union this view with another view.
Is this possible to do?
Best Answer
Yes it is possible:
I assumed that null (which is part of any type) is what is causing you the problem. Replace null with whatever if that is not the case