if we want to INSERT into a table 3 values, and 1 of them at this query need to be always 1, and the SELECT DISTINCT we gona use just get 2 values, and the third one need to be 1 how can i do this ???
this is the query:
Code: Select all
mysql> insert into cidpid (pid,cid,lider) select distinct members.pid,clans.cid
from members,clans where clans.pid_criador='3nrq74z';