Can I insert two different variables from form into different tables using one SQL query ? -- Regards, Sapenov Khazretgali System Engineer CMS 20 Eglinton Ave West Toronto, ON M4R 1K8 sapenov@cmsrecruit.com tel. 416 487-0290 fax. 416 487-5771 toll free :1-888-244-1340
Yes, if you use a custom function: no, if you just want to use SQL. You can wrap as many insert statements as you like into a pl/pgsql function, using values passed in as arguments to your function. Hard to see the point of doing this, though. Surely harder to maintain than actual SQL. "Sapenov" <sapenov@timscanada.com> wrote in message news:5ZSn7.22167$BS1.2402844@news20.bellglobal.com... > Can I insert two different variables from form into different tables using > one SQL query ? > > > > > -- > Regards, > > Sapenov Khazretgali > System Engineer > CMS > 20 Eglinton Ave West > Toronto, ON M4R 1K8 > sapenov@cmsrecruit.com > tel. 416 487-0290 > fax. 416 487-5771 > toll free :1-888-244-1340 >
Sapenov wrote: > > Can I insert two different variables from form into different tables using > one SQL query ? > If what you are trying to achieve is to make sure that one is not inserted without the other (another way of saying "data integrity"), perhaps you should look into transactions.
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера