create or replace view view_name as
select tm.stbid,tm.begintime,tm.endtime,tm.status from tablename1 tm
union all
select ta.stbid,ta.begintime,ta.endtime,ta.status from tablename2 ta;
select tm.stbid,tm.begintime,tm.endtime,tm.status from tablename1 tm
union all
select ta.stbid,ta.begintime,ta.endtime,ta.status from tablename2 ta;