Data Type | Syntax | Explanation (if applicable) |
---|---|---|

integer | integer | |

smallint | smallint | |

numeric | numeric(p,s) | Where is a precision value; p is a scale value. For example, numeric(6,2) is a number that has 4 digits before the decimal and 2 digits after the decimal.s |

decimal | decimal(p,s) | Where is a precision value; p is a scale value.s |

real | real | Single-precision floating point number |

double precision | double precision | Double-precision floating point number |

float | float(p) | Where is a precision value.p |

character | char(x) | Where is the number of characters to store. This data type is space padded to fill the number of characters specified.x |

character varying | varchar2(x) | Where is the number of characters to store. This data type does NOT space pad.x |

bit | bit(x) | Where is the number of bits to store.x |

bit varying | bit varying(x) | Where is the number of bits to store. The length can vary up to x.x |

date | date | Stores year, month, and day values. |

time | time | Stores the hour, minute, and second values. |

timestamp | timestamp | Stores year, month, day, hour, minute, and second values. |

time with time zone | time with time zone | Exactly the same as time, but also stores an offset from UTC of the time specified. |

timestamp with time zone | timestamp with time zone | Exactly the same as timestamp, but also stores an offset from UTC of the time specified. |

year-month interval | Contains a year value, a month value, or both. | |

day-time interval | Contains a day value, an hour value, a minute value, and/or a second value. |

## Wednesday, 5 September 2012

### Datatypes in Sql Server

03:51
Abhinav Ranjan Sinha
No comments

## 0 comments:

## Post a Comment