SQL Data Type overview for beginers

  1. CHAR (n), TEXT (n), VARCHAR (n).

Alphanumeric data either fixed at n symbols or up to n symbols.  It’s not possible to do arithmetic on this data.

  1. REAL, FLOAT, NUMBER, NUMERIC and DECIMAL.

These are numbers with decimal places.

  1. INTEGER, LONG, INT, SMALLINT.

These are all whole numbers.  They vary in the how big a number they can hold.

  1. MONEY, CURRENCY.

These are numeric types with decimal places for holding monetary values.

  1. BINARY, LONGBINARY, GENERAL, IMAGE, OLEOBJECT.

These can hold complete files, such as pictures or media.  They are not of a fixed in size, and the upper limit on their size is large.

  1. DATE, TIME, DATETIME.

These can hold date and time values.  These are hybrid types.  Although you think of them as text type fields, it is possible to do arithmetic and numeric comparisons on them.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s