• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

what is the use of Work table.


Could anyone advise me what is the use of the Work table in Progress. And kindly let us know where we can use only work table and we cannot use the temp table.


ProgressTalk Moderator
Staff member
backwards compatibility :)

from the defining and using temp-tables chapter in the programming handbook

Before you proceed, you should know that there is a variation on the temp-table supported in
Progress called a work-table. You use a DEFINE WORK-TABLE statement to define one. This is an
older feature that predates temp-tables and lacks some of their features. Most important, a
work-table is memory-bound, and you must make sure your session has enough memory to hold
all of the records you create in it. In addition, you cannot create indexes on work-tables. You
also cannot pass a work-table as a parameter between procedures. Although you could use a
work-table for an operation that needed to define a small set of temporary records that don’t
need a lot of memory and don’t need an index, it is better to think of work-tables as being fully
superseded by temp-tables. You should use the newer temp-tables for all of your temporary data
storage needs.
Work table is use to store data in memory instead of hard disk for temp table
Work table don't support index definition

Then i never use it because :
- I don't know the memory available on pc
- I like be sure of the order in wich i display data

Buffer storage. A buffer to store data, as apposed to physical storage in the db. This method enables backwards compatability across versions. The objective is to manipulate data rows, WITHOUT physical access corrupting live data.


ProgressTalk.com Sponsor
FWIW, if the data can be safely held in memory and you don't need an index, i.e., order doesn't matter, work-tables are higher performance than temp-tables and consume less space. It is possible to build a work-table in order, but if you need order just use a temp-table.