Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 1 of 1
02-16-2010, 10:41 PM #1
- Join Date
- May 2009
- Moore, OK
- Thanked 41 Times in 41 Posts
Retrieving the column count of a temporary table?
Is it possible to retrieve the column count of a temporary table. Basically I want to get it like this where I can check column names and data types. But I keep getting an error. Saying table doesn't exist, I believe because it is looking for the actual table not the temp one.
SELECT COUNT(*) FROM `INFORMATION_SCHEMA`.`Columns` WHERE `TABLE_NAME`='Split' && ((`COLUMN_NAME`='id' && `DATA_TYPE`='INT') || (`COLUMN_NAME`='value' && `DATA_TYPE`='TEXT') || (`COLUMN_NAME`='key' && `DATA_TYPE`='INT')) && `TABLE_SCHEMA`=@database
Last edited by Coyote6; 02-16-2010 at 10:50 PM.