Christopher Ballenger Posted July 28, 2017 Share Posted July 28, 2017 Hello, can someone provide me the syntax for CIS to create a temp table I successfully created a permanent table, but having trouble creating a temp one. Thanks, Chris Link to comment Share on other sites More sharing options...
Jason Tiret Posted August 22, 2017 Share Posted August 22, 2017 Hi Chris, Just like physical tables, you can either specify columns or use CREATE TABLE AS SELECT... Here is the syntax: CREATE[LOCAL]{TEMP | TEMPORARY} TABLE table-name{table-element-commalist}[ ON COMMIT {PRESERVE | DELETE} ROWS] or: CREATE[LOCAL]{TEMP | TEMPORARY} TABLE table-nameAS QUERY_EXPRESSION NOTE, this works only in 7.0.4 and above. Regards, Jason Link to comment Share on other sites More sharing options...
Christopher Ballenger Posted September 29, 2017 Author Share Posted September 29, 2017 Thank you! Link to comment Share on other sites More sharing options...
Pieter Wolthoorn Posted May 29, 2019 Share Posted May 29, 2019 Hi Jason, I'm using 7.0.6. When trying CREATE TEMPORARY TABLE temptest AS (SELECT 'test' AS "Test"); I get the following error: Unable to parse SQL script: Incorrect syntax near "BEGIN", found "CREATE". Are you sure it works in 7.0.4 and above Link to comment Share on other sites More sharing options...
Motsu Aboshi Posted May 29, 2019 Share Posted May 29, 2019 I don't think you can do this in an SQL Script, but rather, against a published database from an external db application. Jason can correct me if I'm wrong. Given the age of this post, if you need more help, it might be better to raise a new question. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now