Hi, I was wondering when I will use different data types. Like in my table, how can I decide what to use: nvarchar, nchar, varchar, varbinary, etc.
Examples:
What would I use for a column ...:
Phone number, Address, First Name, Last Name, Email, ID number, etc.
Thanks for any help!
As a rule, I would not define anything as a "number" field, if I were not going to do arithmetic on it, even if the data themselves were numerical.
The telephone field is one example. I would define it as varchar.
Varchar, Integer and Bit cover 99% of my daily use.
. , , .
n..char Unicode, , Unicode , "-n" . nchar char , nvarchar varchar , . , , , .
Microsoft SQL Server 2005, , , char varchar.
, n, , Unicode... , nVarchar.
.
http://www.databasejournal.com/features/mssql/article.phpr/2212141/Choosing-SQL-Server-2000-Data-Types.htm
, , varchar....
N * (NVARCHAR, NCHAR, NTEXT) Unicode. , "" (VARCHAR, CHAR, TEXT), Unicode .
TEXT , , CHAR, .
VARCHAR . , CHAR (a CHAR (20) , 5 ). 15 ).
, , ( ).
, : VARCHAR() ( ), , , , VARCHAR(100) , , , .. VARCHAR(200) URL- .
VARCHAR()
VARCHAR(100)
VARCHAR(200)
, . , 30 ( , ), , - . , a VARCHAR, , VARCHAR(MAX) TEXT , .
VARCHAR
VARCHAR(MAX)
TEXT
, , , VARCHAR : varchar MySQL. , , - VARCHAR s.
Source: https://habr.com/ru/post/1703963/More articles:Is there an easier way to change the value in the subsubsub record field in Erlang? - erlangWindows Message Queuing Service - .netDoes PyS60 have reliable garbage collection? - pythonDoes the Symbian stack limit also apply to PyS60? - pythonparser: parsing formulas in template files - c ++https://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1703964/visual-studio-adds-columns-to-datagridview-after-running-program&usg=ALkJrhi6uiLnxPu6coCxvC-fWX9oWZ-sWgCode generator tool to create properties and support fields - c #mmaping two consecutive pages - cMailDefinition CreateMailMessage Creator from ASP.Net MVC Controller - emailVB XML query for attributes using LINQ - xmlAll Articles