设为首页 - 加入收藏  
您的当前位置:首页 >系统运维 >MySQL视图的概念与实际应用 正文

MySQL视图的概念与实际应用

来源:亿华互联编辑:系统运维时间:2025-11-05 15:55:50
复制create table product   (   product_id int not null,视实际   name varchar(50) not null,   price double not null   );   insert into product values(1, apple , 5.5);   create table purchase   (   id int not null,   product_id int not null,   qty int not null default 0,   gen_time datetime not null   );   insert into purchase values(1, 1, 10, now());  

create view purchase_detail as select product.

name as name, product .price as price, purchase.qty as qty, 

MySQL视图的概念与实际应用

product .price * purchase.qty as total_value from product, 

purchase where  product.product_id = purchase.product_id;   1.2.3.4.5.6.7.8.9.10.11.12.13.14.15.16.17.18.19.

相关推荐:

0.5975s , 17451.3515625 kb

Copyright © 2025 Powered by MySQL视图的概念与实际应用,亿华互联  滇ICP备2023000592号-16

sitemap

Top