Editing MySQL

Jump to navigation Jump to search

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.

Latest revision Your text
Line 181: Line 181:
  
 
TINYINT - -128 to 127 normal / 0 to 255 UNSIGNED.
 
TINYINT - -128 to 127 normal / 0 to 255 UNSIGNED.
 
 
SMALLINT - -32768 to 32767 normal / 0 to 65535 UNSIGNED.
 
SMALLINT - -32768 to 32767 normal / 0 to 65535 UNSIGNED.
 
 
MEDIUMINT - -8388608 to 8388607 normal / 0 to 16777215 UNSIGNED.
 
MEDIUMINT - -8388608 to 8388607 normal / 0 to 16777215 UNSIGNED.
 
 
INT - a numeric type which can accept values in the range of -2147483648 to 2147483647
 
INT - a numeric type which can accept values in the range of -2147483648 to 2147483647
 
 
BIGINT( ) - -9223372036854775808 to 9223372036854775807 normal / 0 to 18446744073709551615 UNSIGNED.
 
BIGINT( ) - -9223372036854775808 to 9223372036854775807 normal / 0 to 18446744073709551615 UNSIGNED.
 
 
DECIMAL - a numeric type with support for floating-point or decimal numbers
 
DECIMAL - a numeric type with support for floating-point or decimal numbers
 
 
FLOAT -  A small number with a floating decimal point.
 
FLOAT -  A small number with a floating decimal point.
 
 
DOUBLE - a numeric type for double-precision floating-point numbers. If you don't know what these are, chances are you won't be using it much.
 
DOUBLE - a numeric type for double-precision floating-point numbers. If you don't know what these are, chances are you won't be using it much.
  
Line 199: Line 192:
  
 
CHAR - a string type with a maximum size of 255 characters and a fixed length
 
CHAR - a string type with a maximum size of 255 characters and a fixed length
 
 
VARCHAR - a string type with a maximum size of 255 characters and a variable length
 
VARCHAR - a string type with a maximum size of 255 characters and a variable length
 
 
TEXT - a string type with a maximum size of 65535 characters
 
TEXT - a string type with a maximum size of 65535 characters
 
 
MEDIUMTEXT - a string with a maximum length of 16777215 characters.
 
MEDIUMTEXT - a string with a maximum length of 16777215 characters.
 
 
LONGTEXT A string with a maximum length of 4294967295 characters.
 
LONGTEXT A string with a maximum length of 4294967295 characters.
  
Line 211: Line 200:
  
 
DATE - a date field in the YYYY-MM-DD format
 
DATE - a date field in the YYYY-MM-DD format
 
 
TIME - a time field in the HH:MM:SS format
 
TIME - a time field in the HH:MM:SS format
 
 
DATETIME - a combined date/time type in the YYYY-MM-DD HH:MM:SS format
 
DATETIME - a combined date/time type in the YYYY-MM-DD HH:MM:SS format
 
 
YEAR - a field specifically for year displays in the range 1901 to 2155, in either YYYY or YY formats
 
YEAR - a field specifically for year displays in the range 1901 to 2155, in either YYYY or YY formats
 
 
TIMESTAMP - a timestamp type, in YYYYMMDDHHMMSS format
 
TIMESTAMP - a timestamp type, in YYYYMMDDHHMMSS format
  
Line 223: Line 208:
  
 
BLOB - a binary type for variable data (MEDIUMBLOB, LONGBLOB .. )
 
BLOB - a binary type for variable data (MEDIUMBLOB, LONGBLOB .. )
 
 
ENUM - a string type which can accept one value from a list of previously-defined possible values
 
ENUM - a string type which can accept one value from a list of previously-defined possible values
 
 
SET - a string type which can accept zero or more values from a set of previously-defined possible values
 
SET - a string type which can accept zero or more values from a set of previously-defined possible values
 +
  
 
=== Giving access to users ===
 
=== Giving access to users ===

Please note that all contributions to s23 are considered to be released under the Creative Commons Attribution Share Alike (see s23:Copyrights for details) unless another license is specified on a specific page. If you don't want your writing to be edited mercilessly and redistributed at will, then don't submit it here.
When uploading your own work you can choose from different cc license types, a GNU license like GFDL or you can declare it entirely Public domain. Use the according license template on a page. If no specific license is specified, Creative Commons Attribution Share Alike will apply. You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource. DO NOT SUBMIT COPYRIGHTED WORK WITHOUT PERMISSION!

Cancel Editing help (opens in new window)