Data Types in SQL

Data Types are used in conjunction with the CREATE TABLE statement to designate the type of data going into a particular cell.

Data types are a way to structure and limit columns within a table. Designating a column to receive a specific data type helps to control the flow of information and can even serve as a security measure. For example a column designated as int(5) might be used for zip code. This would prevent any malware from slipping through even as it would help ensure the integrity of the column. It is an old axiom with computer programming that garbage in creates garbage out. Data types help limit the stream of garbage.

Depending on the vendor of the particular database, there are manifold data types. We will look at some of the types supported by mySQL:

< CREATE TABLE Statement | DEFAULT Constraint SQL >

Send notes in disappearing ink!

Interesting Pages