Data type: Difference between revisions
Jump to navigation
Jump to search
Line 102: | Line 102: | ||
== comparision of datatypes in different database server == | == comparision of datatypes in different database server == | ||
=== numeric === | |||
{{kbd | key=bigint}} | |||
* MS SQL<ref>[https://msdn.microsoft.com/zh-tw/library/ms187745(v=sql.120).aspx int、bigint、smallint 和 tinyint (Transact-SQL)]</ref> & MySQL<ref>[https://dev.mysql.com/doc/refman/5.5/en/integer-types.html MySQL :: MySQL 5.5 Reference Manual :: 11.2.1 Integer Types (Exact Value) - INTEGER, INT, SMALLINT, TINYINT, MEDIUMINT, BIGINT]</ref> are equivalent | |||
=== text === | |||
Storing Unicode text<ref> | Storing Unicode text<ref> | ||
* [http://trufflepenne.blogspot.tw/2012/10/mysql-sqlservernvarchar.html 松露筆管麵: Mysql 等同SqlServer的nvarchar] | * [http://trufflepenne.blogspot.tw/2012/10/mysql-sqlservernvarchar.html 松露筆管麵: Mysql 等同SqlServer的nvarchar] | ||
Line 108: | Line 113: | ||
* MS SQL 2008: {{kbd | key=nvarchar}} | * MS SQL 2008: {{kbd | key=nvarchar}} | ||
=== date and time === | |||
{{kbd | key=DATETIME}}: ex: "2013-06-13 03:33:33" | {{kbd | key=DATETIME}}: ex: "2013-06-13 03:33:33" | ||
* MS SQL 2008 & MySQL are equivalent | * MS SQL 2008 & MySQL are equivalent | ||
Line 114: | Line 120: | ||
* MS SQL 2008<ref>[http://msdn.microsoft.com/en-us/library/ms182776(v=sql.90).aspx timestamp (Transact-SQL)]</ref> ex: 0x00000000000007D3 | * MS SQL 2008<ref>[http://msdn.microsoft.com/en-us/library/ms182776(v=sql.90).aspx timestamp (Transact-SQL)]</ref> ex: 0x00000000000007D3 | ||
* MySQL ex: 2013-06-13 03:33:33 | * MySQL ex: 2013-06-13 03:33:33 | ||
further reading | |||
* [https://www.mssqltips.com/sqlservertutorial/2203/mysql-to-sql-server-data-type-comparisons/ MySQL to SQL Server Data Type Comparisons] | |||
conversion tools | conversion tools |