DBMySQLSQLitePHPRubyRailsJS等的数据类型,因为我有时会忘记它们

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了DBMySQLSQLitePHPRubyRailsJS等的数据类型,因为我有时会忘记它们相关的知识,希望对你有一定的参考价值。

Data Types for DB, mysql, SQLite, php, Ruby, Rails, JS, etc. because I forget them sometimes


from Ruby on Rails Guides: Migrations http://bit.ly/hFWjT0

from Rails Migrations http://bit.ly/hI5zpz
  1. Data Types for DB, MySQL, SQLite, PHP, Ruby, Rails, JS, etc.
  2.  
  3. ====
  4.  
  5. from Ruby on Rails Guides: Migrations http://bit.ly/hFWjT0
  6.  
  7. The types supported by Active Record are :primary_key, :string, :text, :integer, :float, :decimal, :datetime, :timestamp, :time, :date, :binary, :boolean.
  8.  
  9. ====
  10.  
  11. from Rails Migrations http://bit.ly/hI5zpz
  12.  
  13. Migrations support all the basic data types: string, text, integer, float, datetime, timestamp, time, date, binary and boolean:
  14.  
  15. string - is for small data types such as a title.
  16.  
  17. text - is for longer pieces of textual data, such as the description.
  18.  
  19. integer - is for whole numbers.
  20.  
  21. float - is for decimals.
  22.  
  23. datetime
  24. timestamp - store the date and time into a column.
  25.  
  26. date
  27. time - store either the date only or time only.
  28.  
  29. binary - is for storing data such as images, audio, or movies.
  30.  
  31. boolean - is for storing true or false values.

以上是关于DBMySQLSQLitePHPRubyRailsJS等的数据类型,因为我有时会忘记它们的主要内容,如果未能解决你的问题,请参考以下文章