> Neculai Macarie wrote: > [] > > select 'gallery' as table_name, d_image_small, d_image_big > > from gallery > > UNION > > select 'gallery_categ' as table_name, d_image, NULL > > from gallery_categ > > order by table_name; > [] > > select 'gallery' as table_name, d_image_small, d_image_big > > from gallery > > union > > select 'categ' as table_name, d_image, NULL > > from gallery_categ > > order by table_name; > Making a twist to the samples provided > select 'categ' as table_name, d_image, '.' as big > from gallery_categ > union > select 'gallery' as table_name, d_image_small , d_image_big > from gallery > order by table_name; > the results are amazing > 'table_name','d_image','big' > 'categ','img22.jpg','.' > 'categ','img23.jpg','.' > 'categ','img21.jpg','.' > 'galle','img3.jpg','i' > 'galle','img6.jpg','i' > 'galle','img1.jpg','i' > > > To my observations constants in a column declaration limit the column width > to just fit the initial constant. > Your choice of values 'gallary' and 'gallery-categ' just masked that out ;-)
Yes, you are right. Based on your observation I was able to trick him with this query: select Trim( 'gallery ' ) as table_name, d_image_small, d_image_big from gallery UNION select 'gallery_categ' as table_name, d_image, NULL from gallery_categ order by table_name; <mack /> -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]