Click here to Skip to main content
15,889,732 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Does MySQL support User Define table data type like MsSql? or is there any alternate way to accomplish this.
Posted

1 solution

Hi,

Unfortunately, MySQL doesn't have a table variable like SQL Server. The alternative is to use a temp table (TEMPORARY keyword when creating a table). Please read this: Solution for Migrating @Tbl Table Variables[^]
 
Share this answer
 
Comments
Samar chougule 2-Apr-14 3:34am    
Hi Andrius Leonavicius, thanks for response,as you said temp table is use full but can we use temp table as parameter variable in StoreProcedure in mysql so can send datatable as parameter to storeProcedure.
Andrius Leonavicius 2-Apr-14 4:16am    
No, you can't do that. But temporary table is visible in the same session, so you should be able to access your temporary table in the stored procedure.

Also, please read this:
http://www.tutorialspoint.com/mysql/mysql-temporary-tables.htm

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900