Next / Previous / Index / ITC Help System / Publications / Site map / NM Tech homepage

What is a Sybase datatype?

Tech Computer Center logo

Each column in a table has to have a specific datatype for its values. A datatype is simply a kind of information: text, numbers, and so on. Using datatypes allows Sybase SQL Server to sort your information, perform calculations on your data, and to search through your data successfully. Here are some examples of datatypes.
Datatype Description Examples
text Any kind of text, up to 2 Gigabytes in size Name, address, phone number
integer Non-decimal numbers number of things sold
char(x) A fixed length character string. x is the length of the string. Phone number, social security number
varchar(x) A variable length character string that can be no longer than x A person's first name
image A computer graphic A gif or a jpeg
money Monetary values price, cost, salary
decimal Numbers with decimals interest rate, percent change

Don't put phone numbers in an integer field. The hyphen will be understood as a minus sign. Instead of getting 555-0567, you will get 555 minus 567, or -12, which is a hard number to dial. The same holds true for Social Security numbers, and any other number that includes non-numeric data.

If your data doesn't quite fit any of these types, see the SQL server documentation on datatypes.

Next: Creating a Sybase table
See also: Using Sybase tables
Previous: What is a Sybase table?
Site map
Index: Keyword index to help pages
Help: New Mexico Tech Information Technology and Communications: Help System
ITC Publications
To report a problem: File a ticket
Send mail to the User consultant on duty or call them at 575-835-5437
Home: About New Mexico Tech

Maintained by John Shipman,; original by Steve Anderson
Last updated: 1997/06/23 21:14:27 UT
QR two-dimensional bar code