From a05d20252a55fe65a5baec6a6e37844734149ccd Mon Sep 17 00:00:00 2001 From: Asir Vedamuthu Selvasingh Date: Mon, 19 Dec 2016 14:22:23 -0800 Subject: [PATCH] added sql examples --- README.md | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 83f63b2949ba8..9d00ec65aade2 100644 --- a/README.md +++ b/README.md @@ -152,10 +152,27 @@ WebApp webApp = azure.webApps() **Create a SQL Database** -You can create a SQL database instance by using another `define() … create()` method chain. +You can create a SQL server instance by using another `define() … create()` method chain. ```java +SqlServer sqlServer = azure.sqlServers().define(sqlServerName) + .withRegion(Region.US_EAST) + .withNewResourceGroup(rgName) + .withAdministratorLogin("adminlogin123") + .withAdministratorPassword("myS3cureP@ssword") + .withNewFirewallRule("10.0.0.1") + .withNewFirewallRule("10.2.0.1", "10.2.0.10") + .create(); +``` +Then, you can create a SQL database instance by using another `define() … create()` method chain. + +```java +SqlDatabase database = sqlServer.databases().define("myNewDatabase") + .withoutElasticPool() + .withoutSourceDatabaseId() + .withEdition(DatabaseEditions.BASIC) + .create(); ``` #Sample Code