Hi I am trying to create a table using inner select statement...
for example:
CREATE TABLE JmxMonSer AS (SELECT * FROM services WHERE monitoring_enabled = 1);
But keep getting error:
Incorrect Syntax near keyword 'AS', Severity 15
please advice
How about:
SELECT * into JmxMonSer FROM services WHERE monitoring_enabled=1
If the table already exists (and the columns types and ordering line up), you can use:
INSERT INTO JmxMonSer SELECT * FROM services WHERE monitoring_enabled=1