Re: Insert static column into VIEW

2008-10-14 Thread Martijn Tonies
> Hey guys, > > I am trying to construct a specially crafted view for the powerdns > DNS-Server. > This is what I have so far: > CREATE VIEW test4 AS SELECT nummer AS name, ip as content FROM > jabix.spaces JOIN jabix.ves ON spaces.veid = ves.id; Wouldn't this work? CREATE VIEW test4 (name, co

Re: Insert static column into VIEW

2008-10-14 Thread Olaf Stein
You can add a column to a view like this: CREATE VIEW test4 AS SELECT nummer AS name, ip as content, 1 as domain_id FROM jabix.spaces JOIN jabix.ves ON spaces.veid = ves.id; This will set the domain_id vaulues to 1 Olaf On 10/14/08 8:18 AM, "Samuel Vogel" <[EMAIL PROTECTED]> wrote: > Hey guys,

Re: Insert static column into VIEW

2008-10-14 Thread Samuel Vogel
This is exactly what I tried to avoid by using a view. I do not want to have to take care about synchronizing two tables. Is there any way to avoid this? Regards, Samy

Re: Insert static column into VIEW

2008-10-14 Thread Ananda Kumar
Hi Samuel, I am not sure if you can add a new column to a view, but why dont u create a new table test4 as create table test4 AS SELECT nummer AS name, ip as content FROM jabix.spaces JOIN jabix.ves ON spaces.veid = ves.id; And then add the new column to test4. When ever any new data is added int