A database can be created through the Windows Azure Management Portal. You navigate to your Windows Azure SQL Database instance and through Data Services --> SQL Database --> Quick Create you can easily create a database.
Figure 1. Create a database through Windows Azure Management Portal.
Figure 2. Provision of a database (click to enlarge).
Figure 3. Manage the database (click to enlarge).
Figure 4. Manage url of the database (click to enlarge).
Figure 5. Silverlight portal of Windows Azure SQL Database
CREATE TABLE [dbo].[Employee]( [Employee_ID] [int] IDENTITY(10001,1) NOT NULL, [Name] [varchar](50) NOT NULL, [DOJ] [datetime] NULL, [Designation] [varchar](50) NOT NULL, [Job_Description] [varchar](max) NULL, [Photo] [image] NULL, [Salary] [decimal](18, 2) NOT NULL, [Last_Modified] [timestamp] NULL, [Status] [int] NULL CONSTRAINT [DF_Employee_Status] DEFAULT ((0)), [Address] [xml] NULL, CONSTRAINT [PK_Employee] PRIMARY KEY CLUSTERED ( [Employee_ID] ASC )) GO
CREATE
TABLE
[dbo].[Employee](
[Employee_ID] [
int
] IDENTITY(10001,1)
NOT
NULL
,
[
Name
] [
varchar
](50)
[DOJ] [datetime]
[Designation] [
[Job_Description] [
](
max
)
[Photo] [image]
[Salary] [
decimal
](18, 2)
[Last_Modified] [
timestamp
]
[Status] [
CONSTRAINT
[DF_Employee_Status]
DEFAULT
((0)),
[Address] [xml]
[PK_Employee]
PRIMARY
KEY
CLUSTERED
(
[Employee_ID]
ASC
))
GO
Figure 6. Executing a TSQL statement in Windows Azure SQL Database Portal.
INSERT INTO [Employee]([Name],[Designation],[Salary])VALUES('Jeff Price','Manager',500000) INSERT INTO [Employee]([Name],[Designation],[Salary])VALUES('Don Hall','Accountant',40000) INSERT INTO [Employee]([Name],[Designation],[Salary])VALUES('Keith Harris','Supervisor',300000) INSERT INTO [Employee]([Name],[Designation],[Salary])VALUES('Jim Hance','Admin',200000) INSERT INTO [Employee]([Name],[Designation],[Salary])VALUES('Andy Jacobs','Accountant',400000)
INSERT
INTO
[Employee]([
],[Designation],[Salary])
VALUES
'Jeff Price'
'Manager'
,500000)
'Don Hall'
'Accountant'
,40000)
'Keith Harris'
'Supervisor'
,300000)
'Jim Hance'
'Admin'
,200000)
'Andy Jacobs'
,400000)
CREATE PROCEDURE [dbo].[ADD_EMP_DETAILS] -- Add the parameters for the stored procedure here @emp_name varchar(50), @emp_desig varchar(50), @salary decimal(18,2) AS BEGIN -- SET NOCOUNT ON added to prevent extra result sets from -- interfering with SELECT statements. SET NOCOUNT ON; -- Insert statements for procedure here INSERT INTO [Employee] ([Name] ,[Designation] ,[Salary]) VALUES (@emp_name ,@emp_desig ,@salary) SELECT [Employee_ID] FROM Employee where [Employee_ID] = (select IDENT_CURRENT('Employee')) END GO
PROCEDURE
[dbo].[ADD_EMP_DETAILS]
-- Add the parameters for the stored procedure here
@emp_name
(50),
@emp_desig
@salary
(18,2)
AS
BEGIN
-- SET NOCOUNT ON added to prevent extra result sets from
-- interfering with SELECT statements.
SET
NOCOUNT
ON
;
-- Insert statements for procedure here
[Employee]
([
,[Designation]
,[Salary])
(@emp_name
,@emp_desig
,@salary)
SELECT
FROM
Employee
where
[Employee_ID] = (
select
IDENT_CURRENT(
'Employee'
END
CREATE PROCEDURE [dbo].[GET_EMP_DETAILS_BY_NAME] -- Add the parameters for the stored procedure here @emp_name varchar(50) AS BEGIN -- SET NOCOUNT ON added to prevent extra result sets from -- interfering with SELECT statements. SET NOCOUNT ON; -- Insert statements for procedure here SELECT * FROM [Employee] WHERE [Name] = @emp_name END GO
[dbo].[GET_EMP_DETAILS_BY_NAME]
(50)
*
WHERE
] = @emp_name
Figure 7. Add generated items - Consume Adapter Service
Picture 8. Configure adapter - Security.
Picture 9. Configure adapter - URI Properties.
Figure 10. Connect to Windows Azure SQL Database.
Figure 11. Adding the procedures.
Figure 12. Stored Procedure schemas (click to enlarge).
Read suggested related topics: