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
Neculai Macarie wrote:
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
Hi!
Using Union and Order By gives strange behaviour in the following test-case:
drop table if exists gallery;
drop table if exists gallery_categ;
# create test tables
create table gallery (d_image_small char(100), d_image_big char(100));
create table gallery_categ (d_image char(100));
# insert
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