Re: INSERT using SELECT results

2007-02-18 Thread Afan Pasalic
INSERT INTO ztipos (type) VALUES (SELECT DISTINCT type FROM locais) ? -afan Miguel Vaz wrote: Hi, I have a table LOCAIS with: idtypedesc 1t1blah blah 2t1uihuih 3t2pokpokp I want to list only the distinct types and create a table

Re: INSERT using SELECT results

2007-02-18 Thread Anoop kumar V
This may help you: mysql> create table locais( -> id int, -> type varchar(2), -> `desc` varchar(10)); Query OK, 0 rows affected (0.12 sec) mysql> select * from locais; +--+--+---+ | id | type | desc | +--+--+---+ |1 | t1 | sk| |2 | t2 | dsk |