create or replace view tbtky_catalognode_applyform_v as select u.f_formeid as vid,a.F_USERNAME,c.f_name,a.F_PHONE,a.F_EMAIL,a.F_FAX,a.F_ZIPCODE,a.F_ADDRESS,a.f_data,c.f_time,c.f_abstract,c.f_region,c.f_contactemail,c.f_contactwebsite from Tbtky_Applyform u left join Tbtky_User_Role_v a on u.f_userid=a.f_userid left join Tbtky_Catalognode c on c.f_id=u.f_dataid;
create or replace view tbtky_catalognode_applyform_v as 创建视图的语句,视图不是表,是一种查询方式,没有主键select u.f_formeid as vid设置主键语句
left join ... on 左表(A)的记录将会全部表示出来,而右表(B)只会显示符合搜索条件的记录