使用文本框更改列名称 [英] Change column name using a textbox

查看:72
本文介绍了使用文本框更改列名称的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嘿,有没有办法更改一个表的列名,该列名等于在复选框中输入的名称?我想使用系统日期向我的表添加列。所以列名将是系统日期。任何方法家伙?

hey, is there any way to change a column name of a table that is equal to a name entered in a check box ? i want to add columns to my table using system date. so the column name will be system date. any methods guys ?

推荐答案

创建以日期为名的列是一个非常糟糕的主意和一个非常糟糕的设计。但是,没有其他原因你不能这样做。你会想要删除特殊字符,例如/和 - ,所以你会想要你的日期,例如20150509。



我强烈要求建议您重新考虑数据库设计,并有一个表格,将日期存储在一列中,然后将员工存储在另一列中,并在每个日期为每个员工创建一条记录。
Creating columns with dates as their name is a very bad idea and a very bad design. However, there is no other reason you cannot do it. You'll want to strip out special characters such as "/" and "-" so you'll want your dates like 20150509, for example.

I would strongly suggest you rethink your database design and have a table that stores the date in one column and then the employees in another column and create a record for each employee on each date that you need.


这篇关于使用文本框更改列名称的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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