From: Martijn Tonies Date: October 14 2008 1:27pm Subject: Re: Insert static column into VIEW List-Archive: http://lists.mysql.com/mysql/214876 Message-Id: <023e01c92e00$9c5d2ec0$9902a8c0@martijnws> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit > 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, content, domain_id) AS SELECT nummer AS name, ip as content, 1 FROM jabix.spaces JOIN jabix.ves ON spaces.veid = ves.id; Martijn Tonies Database Workbench - tool for InterBase, Firebird, MySQL, NexusDB, Oracle & MS SQL Server Upscene Productions http://www.upscene.com My thoughts: http://blog.upscene.com/martijn/ Database development questions? Check the forum! http://www.databasedevelopmentforum.com > +--------+---------------+ > | name | content | > +--------+---------------+ > | 234235 | 11.46.3.22 | > | 345232 | 11.46.3.53 | > +--------+---------------+ > > But this is only a part of what powerdns expects as input table. > For example I would like to add a field namend 'domain_id', which is > always set to 1 or defaults to 1, without altering my existing tables. > > How would I achieve this? > > Regards, > Samy > > -- > MySQL General Mailing List > For list archives: http://lists.mysql.com/mysql > To unsubscribe: http://lists.mysql.com/mysql?unsub=m.tonies@stripped >