It isn't possible.
SQL Server Identity fields can only be numeric. If you want this, then the only solution is to discard the "M" part and add that on later whenever you use the field.
MSDN[
^]
"sir I know this is not possible through Identity.But how can we do this please give me solution ;
Thanks Sir"
The only way to autoincrement numbers in SQL Server is to use identity. The only solution is to not store the True ID in the table if you need an automatically changing identity field.
If you need to have IDs which are "Mnnn" where "nnn" starts with 1 and increments by 9 each time, then I would suggest use an identity field in the table with an increment of one, and have a pair of translation methods:
private static string ToExternalID(int id)
{
return string.Format("M{0:d3}", id * 9);
}
private static int FromExternalID(string id)
{
return int.Parse(id.Substring(1)) / 9;
}
You will probably want to add some error checking to these before you use them for real!