求一视图sql语句
有三个表A,B,C每个表都有title和content这两个字段,想做一个视图,把三个表联合起来,视图有两字段title和content。视图包含三个表的所有内容。
------解决方案--------------------是这样?
create view test_v
as
select title,content from A
union all
select title,content from B
union all
select title,contentfrom C
------解决方案--------------------create view test_v
as
select title,content '来自A ' as type as from A
union all
select title,content, '来自B ' from B
union all
select title,content, '来自C ' from C