Hi! Could we please enable some services and cookies to improve your experience and our website?

SQLize | PHPize | SQLtest

Online Sandbox for SQL and PHP: Write, Run, Test, and Share SQL Queries and PHP Code

A A A
Login    Share code      Blog   FAQ
Copy Format Clear
create table t1( id serial, price_start int ); create table t2( id serial, price_end int ); insert into t1(price_start) values(100); insert into t1(price_start) values(200); insert into t1(price_start) values(300); insert into t1(price_start) values(400); insert into t2(price_end) values(200); insert into t2(price_end) values(300); insert into t2(price_end) values(400); insert into t2(price_end) values(500); CREATE MATERIALIZED VIEW t_view AS SELECT t1.price_start+t2.price_end FROM t1 join t2 using (id); select * from t_view; insert into t1(price_start) values(400); insert into t2(price_end) values(200); select * from t_view; REFRESH MATERIALIZED VIEW t_view; select * from t_view;

Stuck with a problem? Got Error? Ask AI support!

Copy Clear