Home > database >  Informix no similar Oracle with sub queries as the use of the part
Informix no similar Oracle with sub queries as the use of the part

Time:10-14

Informix no similar Oracle with sub queries as the use of the part

CodePudding user response:

There is no answer

CodePudding user response:

With similar to the Oracle as, for example:
With table_tst as (
Select '123123' user_id, rptdate '201904', '47 monfee from dual
)
Select * from table_tst;

CodePudding user response:

No, you can use the select.. into... Format, select '123123' user_id, rptdate '201904', '47 monfee from dual into table_tst, create a table of table_tst also insert the data at the same time,

CodePudding user response:

The
reference 3 floor wgf098 response:
no, you can use the select.. into... Format, select '123123' user_id, rptdate '201904', '47 monfee from dual into table_tst, create a table of table_tst also insert the data at the same time,

Thank you for your answer, but I don't want to insert and create a table, is only temporary

CodePudding user response:

You can select... Into temp table_tst, create a temporary table, the session, a temporary table is automatically released, many operation will automatically create a temporary table within the database, too, just don't feel outside,

CodePudding user response:

reference 5 floor wgf098 reply:
can select... Into temp table_tst, create a temporary table, the session, a temporary table is automatically released, many operation will automatically create a temporary table within the database, too, just don't feel outside,

Thank you for your answer! So can also, but I still have a few questions:
That created the temporary table, need not to need to submit to use?
If I don't close the session, the use of rollback, temporary table will be released?
If I have the select... Into temp table_tst, whether can cause data repeat?
That is to say, before each execution should be forbid to manually drop zero table or truancate data?

CodePudding user response:

refer to 6th floor can Only reply:
Quote: refer to the fifth floor wgf098 reply:

You can select... Into temp table_tst, create a temporary table, the session, a temporary table is automatically released, many operation will automatically create a temporary table within the database, too, just don't feel outside,

Thank you for your answer! So can also, but I still have a few questions:
That created the temporary table, need not to need to submit to use?
If I don't close the session, the use of rollback, temporary table will be released?
If I have the select... Into temp table_tst, whether can cause data repeat?
That is to say, before each execution should be forbid to manually drop zero table or truancate data?


Don't submit can use,
If not, close the session after the rollback temporary table is released,
The same temp table_tst, unable to execute the select many times... Into temp table_tst; Because this statement to create tables and insert data, so the second execution tip table already exists,
If need be used multiple times will have to drop off, can drop table if the exists table_tst. Such grammar, does not return table_tst there is no error message,

CodePudding user response:

refer to 7th floor wgf098 response:
Quote: refer to the sixth floor Only able to reply:

Quote: refer to the fifth floor wgf098 reply:

You can select... Into temp table_tst, create a temporary table, the session, a temporary table is automatically released, many operation will automatically create a temporary table within the database, too, just don't feel outside,

Thank you for your answer! So can also, but I still have a few questions:
That created the temporary table, need not to need to submit to use?
If I don't close the session, the use of rollback, temporary table will be released?
If I have the select... Into temp table_tst, whether can cause data repeat?
That is to say, before each execution should be forbid to manually drop zero table or truancate data?


Don't submit can use,
If not, close the session after the rollback temporary table is released,
The same temp table_tst, unable to execute the select many times... Into temp table_tst; Because this statement to create tables and insert data, so the second execution tip table already exists,
If need be used multiple times will have to drop off, can drop table if the exists table_tst. Such grammar, does not return error message table_tst does not exist,


Understand, thank you thank you

CodePudding user response:

In informix 14.10 supports the syntax of the previous version is to use the

Select * from (select '123123' user_id, rptdate '201904', '47 monfee from dual) table_tst;

Instead,
  • Related