在mysql中动态添加列 [英] Dynamically adding a column in mysql

查看:86
本文介绍了在mysql中动态添加列的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

hi



i尝试添加列并将文本框中的数据保存到Web应用程序中动态创建的列中....





所以请通过示例或链接指导我这个内容







提前谢谢

hi

i am trying to add a column and save the data from the textbox to the dynamically created columns in the web application....


so please guide me in doin this with sample examples or links



Thanks in advance

推荐答案

可以使用 ALTER TABLE在运行时更改表声明。在您的情况下,需要 ADD COLUMN 变体。添加该列后,它可以像表中的任何其他列一样使用。

对于 AlTER TABL E语句,请参阅

http://dev.mysql.com/doc/refman/ 5.1 / en / alter-table.html [ ^ ]
Tables can be changed at runtime with the ALTER TABLE statement. In your case, the ADD COLUMN variant is required. After the column has been added, it can be used like any other column of the table.
For the AlTER TABLE statement, see
http://dev.mysql.com/doc/refman/5.1/en/alter-table.html[^]


要添加列,请参阅:13.1.7。 ALTER TABLE语法 [ ^ ]

在现有MySQL表中添加一列 [ ^ ]



在开始编程之前,需要安装MySQL连接器:< a href =http://dev.mysql.com/doc/refman/5.0/en/connector-net-installation-windows.html> 20.2.2.1。在Windows上安装Connector / Net [ ^ ]。



构建连接字符串: http://www.connectionstrings.com/mysql [ ^ ]



示例:

带有MySQL连接器的C#ASP.NET MySQL连接教程 [ ^ ]

VB.NET到MySQL数据库连接 [ ^ ]

使用C#a连接到MySQL数据库和.NET [ ^ ]



启动是否足够?
To add column see this: 13.1.7. ALTER TABLE Syntax[^]
Add a column to an existing MySQL table[^]

Before you start programming, you need to install MySQL connector: 20.2.2.1. Installing Connector/Net on Windows[^].

To build connection string: http://www.connectionstrings.com/mysql[^]

Examples:
C# ASP.NET MySQL Connection Tutorial with MySQL Connector[^]
VB.NET to MySQL Database Connection[^]
Connecting to MySQL Database using C# and .NET[^]

Is it enough for start?


这篇关于在mysql中动态添加列的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆