CRTEATE VIEW VIEW_NAME
AS
SELECT createyear,prisonercode
FROM A1,B1
WHERE 条件
----注明:这里的条件要求使得A1表B1表按照某一条件连接起来,如果没有条件(即舍去WHERE 条件)就会得到一个行数为表A1的行数和表B1的行数的笛卡尔乘积的表
create view newview
as
select a.createyear,b.prisonercode
from A1
left join B1
on 条件
Create View 视图名
AS
select A1.createyear,Bi.prisonercode
from A1,B1
where 条件
是 CREATE VIEW VIEW_NAME 无语了