I agree that there are better ways to do this. But for me this works. (legacy driven situation) INSERT INTO tbinitialisatie (col1, col2) SELECT 'x', 'y' FROM tbinitialisatie WHERE not exists (select * from tbinitialisatie where col1 = 'x' and col2 = 'y') LIMIT 1 Pau Marc Muñoz Torres schreef: Ok , thanks Sim, now i see it |
- [GENERAL] conditional insert Pau Marc Muñoz Torres
- Re: [GENERAL] conditional insert Achilleas Mantzios
- Re: [GENERAL] conditional insert Raymond O'Donnell
- Re: [GENERAL] conditional insert Thomas Kellerer
- Re: [GENERAL] conditional insert Pau Marc Muñoz Torres
- Re: [GENERAL] conditional insert Sim Zacks
- Re: [GENERAL] conditional insert Pau Marc Muñoz Torres
- Re: [GENERAL] conditional ins... J. Hondius
- Re: [GENERAL] conditional... Lincoln Yeoh
- Re: [GENERAL] conditi... Merlin Moncure
- Re: [GENERAL] conditi... Merlin Moncure
- Re: [GENERAL] conditi... Lincoln Yeoh
- Re: [GENERAL] conditi... Andrew Sullivan
- Re: [GENERAL] conditi... Merlin Moncure
- Re: [GENERAL] conditi... Andrew Sullivan
- Re: [GENERAL] conditi... Merlin Moncure
- Re: [GENERAL] conditi... Lincoln Yeoh
- Re: [GENERAL] conditi... Andrew Sullivan