Wednesday, April 8, 2015
sql newid()
Yes, newid() is unique. newid() returns a globally unique identifier. newid() will be unique for each call of newid().
Thus, newid() can be used as the value of a primary key of a sql server table. Values returned by newid() can be inserted into a primary key column of type "uniqueidentifier". Here is an example of a "uniqueidentifier" primary key column, with newid() used as the default value:
CREATE TABLE [tblUsers] (
[UserId] [uniqueidentifier] NOT NULL DEFAULT (newid()),
[UserName] [varchar](256) NOT NULL,
PRIMARY KEY ([UserId])
)
[UserId] [uniqueidentifier] NOT NULL DEFAULT (newid()),
[UserName] [varchar](256) NOT NULL,
PRIMARY KEY ([UserId])
)
Select Dropdown option in jquery
CaseId=0; or
CaseId=1;or
CaseId=2; or
CaseId=3;
$('#ddl').val(CaseId);
CaseId=1;or
CaseId=2; or
CaseId=3;
$('#ddl').val(CaseId);
SQL UPDATE Syntax
UPDATE table_name
SET column1=value1,column2=value2,...
WHERE some_column=some_value;
SET column1=value1,column2=value2,...
WHERE some_column=some_value;
Why to choose Asp.Net Web API ?
- If we need a Web Service and don’t need SOAP, then ASP.Net Web API is best choice.
- It is Used to build simple, non-SOAP-based HTTP Services on top of existing WCF message pipeline.
- It doesn't have tedious and extensive configuration like WCF REST service.
- Simple service creation with Web API. With WCF REST Services, service creation is difficult.
- It is only based on HTTP and easy to define, expose and consume in a REST-ful way.
- It is light weight architecture and good for devices which have limited bandwidth like smart phones.
- It is open source.
Subscribe to:
Posts (Atom)