create table script and view working