![]() |
|
|
+ Search |
![]()
|
Jul 22nd, 2000 00:36
unknown unknown, Bruce Anwyl
To create a temporary table you must put a # symbol as the first
character in the table name. If the table is created in a stored
procedure then it is automatically dropped when the stored procedure
returns.
CREATE TABLE #InvoiceData
(
[JobID] [int] NOT NULL ,
[ItemUnit] [varchar] (3) NOT NULL ,
[ItemName] [varchar] (50) NOT NULL ,
[ItemUnitPrice] [money] NOT NULL
)
To use the temporary table, you refer to it using the name as follows
INSERT INTO #InvoiceData
. . . extra stuff here.
If you want a permanent table then use the same syntax without the #.
© 1999-2004 Synop Pty Ltd