如何在mySql中创建动态表
我想知道如何在 mySql 中创建动态表。我在 Sqlserver 2008 中使用了动态表,但我是 mySql 的新手。是否可以 ?
例如:在 Sql 服务器中,我创建了动态客户表。
DECLARE @tblCustomer as table(
[ ] bit
,Sl# int
,custID int
,CustCode varchar(max)
,Customer nvarchar(max)
,Authorized bit
,RCount int)
SELECT * FROM @tblCustomer
请帮忙
I want to know how to create dynamic table in mySql . I have used dynamic table in Sqlserver 2008 but i am new to mySql . Is it possible ?
Eg: In Sql server i have created Dynamic Customer Table.
DECLARE @tblCustomer as table(
[ ] bit
,Sl# int
,custID int
,CustCode varchar(max)
,Customer nvarchar(max)
,Authorized bit
,RCount int)
SELECT * FROM @tblCustomer
Please Help
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
将 CREATE TABLE 语句放入 @sqlstmt 中,就可以开始了!
这张桌子是真的。之后您将不得不放下桌子。
Place the CREATE TABLE statement in @sqlstmt and you are good to go !
The table is a real one. You would have to drop the table afterwards.
非常容易做到:
它将尽可能从架构中获取现有的字段类型。
Pretty easy to do:
It will take the existing field types from the schema where possible..