I've managed to create the below statement that creates a table based on a point in polygon query. However it creates a column that gives a true/false value which I then delete out all the f values from. Is there a better way of producing this statement?
CREATE TABLE crime_test AS SELECT a.*, b.town, ST_within(a.the_geom, b.the_geom) "within" FROM crime_data a, nh_areas b; DELETE FROM crime_test WHERE within = 'f'