如何在Azure SQL数据库中创建表? [英] How to create tables in Azure SQL Database?

查看:119
本文介绍了如何在Azure SQL数据库中创建表?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

因此,根据"如何对Azure移动应用程序使用Apache Cordova客户端库",移动应用程序后端服务的文档,我将使用此代码创建与Azure SQL数据库的连接并查询表和 从现有表中检索数据.

So, according to the "How to use Apache Cordova client library for Azure Mobile Apps" documentation for the mobile-app backend service, I would use this code to create a connection to Azure SQL Database and query the tables and retrieve data from EXISTING tables.

var client = WindowsAzure.MobileServiceClient(appUrl);

var table = client.getTable(tableName);

table .read().then(成功,失败);

现在我的问题是,如何从移动应用程序本身将一个全新的表创建到数据库中?根据提供的代码,它仅允许查询通过简易表"创建的现有表.现在,我希望能够自己创建表 在移动应用中.有没有允许我执行此操作的代码或示例?任何帮助都会很棒!

Now my question is how does one CREATE a totally new table into the database from the mobile app itself? From the code provided, it only allows query's into existing tables created via "Easy Tables". Now I want to be able to create the tables themselves within the mobile app. Is there a code or example which allows me to do this? Any help would be great!

推荐答案

Hello,

Please read the following article to create an Easy Table table with Apache Cordova.

http://dotnetmafia.com/blogs/dotnettipoftheday/archive/2016/04/27/getting-started-with-azure-app-service -and-easy-tables.aspx

http://dotnetmafia.com/blogs/dotnettipoftheday/archive/2016/04/27/getting-started-with-azure-app-service-and-easy-tables.aspx


Hope this helps.


Regards,

SQLCoffee

Alberto Morillo
SQLCoffee.com


这篇关于如何在Azure SQL数据库中创建表?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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