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

MySQL视图的概念与实际应用

来源:汇智坊编辑:应用开发时间:2025-11-04 22:55:00
复制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.1341s , 11630.515625 kb

Copyright © 2025 Powered by MySQL视图的概念与实际应用,汇智坊  滇ICP备2023006006号-2

sitemap

Top