Hi Thomas, Figured it.. Query is little different from the above queries. (No need to have 'AS' constraint to insert constant value "ALL".)
INSERT INTO test(KEY,AUTHZ_DOMAIN) SELECT KEY , 'ALL' FROM table2; Regards, Dinusha. On Fri, Feb 15, 2013 at 2:20 PM, Thomas Mueller < [email protected]> wrote: > Hi, > > Yes, this should work. Does it not? > > Regards, > Thomas > > > On Thu, Feb 14, 2013 at 11:14 AM, Dinusha Dilrukshi < > [email protected]> wrote: > >> Hi All, >> >> We can do the same in MySQL and Oracle in following ways. Is this >> possible in H2 as well ? >> >> MySQL: >> >> INSERT INTO test(KEY,AUTHZ_DOMAIN) >> SELECT KEY, "ALL" as new_val >> FROM table2; >> >> Oracle: >> >> INSERT test(KEY,AUTHZ_DOMAIN) >> SELECT table2.CONSUMER_KEY AS a , 'ALL' AS b >> FROM table2; >> / >> >> Regards, >> DInusha. >> >> -- >> You received this message because you are subscribed to the Google Groups >> "H2 Database" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected]. >> To post to this group, send email to [email protected]. >> Visit this group at http://groups.google.com/group/h2-database?hl=en. >> For more options, visit https://groups.google.com/groups/opt_out. >> >> >> > > -- > You received this message because you are subscribed to the Google Groups > "H2 Database" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > Visit this group at http://groups.google.com/group/h2-database?hl=en. > For more options, visit https://groups.google.com/groups/opt_out. > > > -- You received this message because you are subscribed to the Google Groups "H2 Database" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/h2-database?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
