
By Adam Grocholski | Article Rating: |
|
October 24, 2013 11:00 AM EDT | Reads: |
1,432 |

In my previous post (http://thinkfirstcodelater.com/blog/?p=3290) I showed you how to view details for a specific table in your Windows Azure Mobile Service using the Windows Azure cross platform command line tools. In this post I’ll show you how to modify an existing table in your Windows Azure Mobile Service.
Once again, just a reminder that I’m using the command line tools on a MacBook Air with OSX (Mountain Lion) installed, and I’m using Google Chrome as my default browser. However, the experience should be identical on Windows and Linux as well.
Open an instance of your command line (Terminal, Bash, Command Prompt, etc.) and type the following:
azure mobile table update -h
The mobile table update command is the command to use if you want to modify a table. You need to specify two parameters in order to use the command:
- The name of your Windows Azure Mobile Service
- The name of the table you want to update
You can use the following options to perform various update operations on a table:
- -p, –permissions. Update the permissions associated with the table’s operations (insert, read, update, delete).
- –deleteColumn. Delete columns from the table.
- –addIndex. Add indexes to the table.
- –deleteIndex. Delete indexes from the table.
For this post, we’ll simply add an index to a table. Enter the following command into your CLI to view the details for a specific table, substituting where appropriate:
mobile table show ‘[YOUR MOBILE SERVICE NAME]‘ ‘[YOUR TABLE NAME]‘
In my case I entered the following:
mobile table show ‘zumo-00005′ ‘Movie’
Currently my Movie table has a single index on the id column. To add an index to a column enter the following into your CLI, once again substituting where appropriate:
azure mobile table update –addIndex ‘[YOUR COLUMN NAME]‘ ‘[YOUR MOBILE SERVICE NAME]‘ ‘[YOUR TABLE NAME]‘
In my case I entered the following:
azure mobile table update –addIndex ‘title’ ‘zumo-00005′ ‘Movie’
Once the operation completes successfully, run the mobile show command again using the following:
mobile table show ‘[YOUR MOBILE SERVICE NAME]‘ ‘[YOUR TABLE NAME]‘
In my case I entered the following:
mobile table show ‘zumo-00005′ ‘Movie’
We now see the second index has been added to the table. This can also be verified by going to the Windows Azure Management Portal, navigating to your Mobile Service, going to the data tab, and clicking on the table you just updated.
That’s it for now. In my next post I’ll show you how to delete a table from your Windows Azure Mobile Service using the cross platform command line tools.
Did you know you can try Windows Azure for free for 30 days? Just go to http://aka.ms/thecloud and sign up.
Read the original blog entry...
Published October 24, 2013 Reads 1,432
Copyright © 2013 SYS-CON Media, Inc. — All Rights Reserved.
Syndicated stories and blog feeds, all rights reserved by the author.
More Stories By Adam Grocholski
Hey there! My name is Adam Grocholski, and I'm a Technical Evangelist at Microsoft where I spend time focusing on Windows, Windows Phone, and Windows Azure. I live in the frozen tundra of Minnesota and run thinkfirstcodelater.com. You can also follow me on twitter at @codel8r.
![]() Apr. 26, 2018 05:00 PM EDT Reads: 7,271 |
By Liz McMillan Apr. 26, 2018 03:30 PM EDT Reads: 2,840 |
By Pat Romanski Apr. 26, 2018 03:30 PM EDT Reads: 1,601 |
By Elizabeth White Apr. 26, 2018 03:00 PM EDT Reads: 7,857 |
By Elizabeth White ![]() Apr. 26, 2018 02:00 PM EDT Reads: 4,425 |
By Yeshim Deniz Apr. 26, 2018 01:30 PM EDT Reads: 1,073 |
By Pat Romanski ![]() Apr. 26, 2018 01:15 PM EDT Reads: 9,042 |
By Elizabeth White ![]() Apr. 26, 2018 01:00 PM EDT Reads: 1,397 |
By Yeshim Deniz Apr. 26, 2018 12:45 PM EDT Reads: 579 |
By Yeshim Deniz ![]() Apr. 26, 2018 12:00 PM EDT Reads: 5,395 |
By Elizabeth White ![]() Apr. 26, 2018 11:45 AM EDT Reads: 7,351 |
By Liz McMillan ![]() Apr. 26, 2018 11:15 AM EDT Reads: 7,448 |
By Liz McMillan ![]() Apr. 26, 2018 11:00 AM EDT Reads: 10,026 |
By Elizabeth White Apr. 26, 2018 11:00 AM EDT Reads: 1,978 |
By Yeshim Deniz Apr. 26, 2018 11:00 AM EDT Reads: 1,271 |
By Elizabeth White ![]() Apr. 26, 2018 09:45 AM EDT Reads: 6,744 |
By Pat Romanski ![]() Apr. 26, 2018 08:45 AM EDT Reads: 8,947 |
By Liz McMillan ![]() Apr. 26, 2018 06:45 AM EDT Reads: 6,716 |
By Elizabeth White ![]() Apr. 26, 2018 05:15 AM EDT Reads: 6,238 |
By Elizabeth White ![]() Apr. 26, 2018 04:45 AM EDT Reads: 8,917 |