输入banner图图片脚本导航/分类

mysql(4,视图)

cust_name,cust_contact FROM customers c inner join orders o on c.cust_id=o.cust_id inner join orderitems oi on oi.order_num=o.order_num and prod_id=TNT2

2 .创建 视图  productcustomers(没有

 prod_id=‘TNT2‘限制条件

)

create view productcustomers as 
select cust_name,cust_contact,prod_id FROM
customers c inner join orders o on c.cust_id=o.cust_id
inner join orderitems oi on oi.order_num=o.order_num

技术分享

 

3. 查询视图(使用 where prod_id=‘TNT2‘)

技术分享

4.show create view xxx

 技术分享

 5.drop view xxx 删除视图

mysql(4,视图)

标签: