如何向现有的Azure表格存储中添加新列 [英] How to add a new column to an existing azure table storage

查看:94
本文介绍了如何向现有的Azure表格存储中添加新列的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们正在使用azure表存储,并且有成千上万个使用相同模式的表.现在,我们正在寻找在这些表中添加另一列.我们如何在现有表中添加另一列而不删除表并重新添加呢?

We are using azure table storage and have thousands of tables using the same schema. Now we are looking to add another column to these tables. How do we add another column to our existing tables without deleting the table and re-adding it?

推荐答案

Windows Azure表存储实际上没有列.每个实体(例如,行)只是一组属性,没有固定的架构.如果您使用强类型的类向表中写入数据,则只需将新属性添加到该类中.

Windows Azure Table Storage doesn't actually have columns. Each entity (e.g. a Row) is simply a set of properties, with no fixed schema. If you're using a strongly-typed class to write to your table, then you just need to add your new property to that class.

对于没有新属性的旧行,您的类对象中的值将设置为其默认值.

For older rows that don't have the new property, the value in your class object will be set to its default value.

这篇关于如何向现有的Azure表格存储中添加新列的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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