搜索

MySQL视图的概念与实际应用

发表于 2025-11-05 08:18:44 来源:益强智未来
复制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.

随机为您推荐
版权声明:本站资源均来自互联网,如果侵犯了您的权益请与我们联系,我们将在24小时内删除。

Copyright © 2016 Powered by MySQL视图的概念与实际应用,益强智未来  滇ICP备2023006006号-17sitemap

回顶部