I do not believe that the AddGeometryColumn part is possible at all. This thread tells that it is not possible withto use it for attached databases https://groups.google.com/forum/#!topic/spatialite-users/rRMSHk2Lt38 and the TEMPtemporary database feels like a sort ofis an attached, automatically created database as well. You must create your temporary tables into the main database and drop them once you do not need them any more.