reset temporary table

You can use 3 ways: 1 is slow, 2 are fast.
Slow way:
delete_from tmpTable;

Fast way 1:
tmpTable = null; // Use this only if you are experienced in using tmpTables
and handling objects

Fast way 2:
void method()
{
TmpTable tmpTable;

void clearTmpTable()
{
TmpTable tmpTableLocalEmpty;
;
tmpTable.setTmpData(tmpTableLocalEmpty);
}

tmpTable.SetTmpData(Class::getData());
//here tmpTable has data
clearTmpTable()
//here tmpTable doesn’t have data
}

Which way to use is for you to decide

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: