| Forum Home | ||||
| Press F1 | ||||
| Thread ID: 39772 | 2003-11-17 01:48:00 | SQL: Temporary Tables | Erin Salmon (626) | Press F1 |
| Post ID | Timestamp | Content | User | ||
| 192581 | 2003-11-17 01:48:00 | Hi, Can someone explain to me how to determine just how temporary a temporary table is. I am trying to use one for a shopping cart system, in which the user stores products in a temporary table. The temporary table would be deleted after they leave. I've run SQL in a query in mySQL to create a temporary table, and I can access the table for about a minute or two, after which it is gone. How can I extend this time to suit my application? Cheers, Erin |
Erin Salmon (626) | ||
| 192582 | 2003-11-17 03:21:00 | Temporary tables are associated with a connection ... and last only as long as the connection. Perhaps since http: is not a connection protocol, that is the problem. ;-) This note (zez.org) might give you some ideas. | Graham L (2) | ||
| 192583 | 2003-11-17 03:38:00 | I use MS SQL Server, which i'm assuming will be the same SQL: Use #(Table_Name) for a local temp table, which disappears when the code completes ie if the temp table is in a stored procedure or running a batch of code together. Use ##(Table_Name) for a temp table that you can call from a different connection to the server. |
Marlboro (4607) | ||
| 1 | |||||