4

I am developing a procedure where I need to insert all the columns of one table to another table including other calculation.

I have to fetch record by record, manipulate it and transfer it to another table.

is there a type definition similar to the oracle rowtype in mysql???

Any help like example or any link will be very helpful to me.

Thanks in advance...

4

1 回答 1

0

不,没有类似的东西。您必须为要获取的每一列声明一个变量(http://www.mssqlforums.com/fetching-entire-row-cursor-t93078.html)。

有关如何在 SQL-Server 中使用游标的示例,请参阅这篇文章:Get Multiple Values in SQL Server Cursor

编辑:抱歉 Miljen Mikic,我的错 - 但对于 mysql 应用相同:请参阅这篇文章:Conversion of Oracle %ROWTYPE to MySQL

MySQL 没有相当于 Oracle %ROWTYPE。在 MySQL 中,必须为每一列声明一个变量。

于 2013-05-22T12:28:46.270 回答