use test; drop table if exists rooms, area; create table rooms ( width double(5,2) default 0, length double(5,2) default 0, location int ); insert into rooms values ( 12.0 ,6.0, 1), (15.0, 4.0, 1), (18.0, 4.0, 3), (4.0, 4.0, 2); select @area := length * width from rooms; create table area ( area double(5,2)); insert into area select @area := length * width from rooms; select * from area; select distinct( area ) from area; truncate area; insert into area select distinct @area := length * width from rooms; select * from area;