Search code examples
sqlstored-proceduresinformixtemp-tables

How to check the Temp table count in informix


How to check the Temp table has rows in informix like

i check the datatable in c#

if( dt != null && dt.rows.count >0)
{
   //------
}

i want to do like the previous check in my informix stored procedure temp table .


Solution

  • Use standard:

    SELECT COUNT(*) FROM temp_table_1234
    

    In stored procedures and triggers you can use it like:

    ... 
    for each row
        when (select count(*) from my_temp_table > 1) ...