Diff. betn. nvarchar & varchar.
-
Hi, Can anyone tell me the diff. betn. nvarchar & varchar , and int & number datatypes in SQL 2000 Server database. Also I want to change the length of the data field of int datatype from 8 to 10, but I'm not able to change it. Thanx & Regards. Success is not a Destination, ... But a Journey !!
-
Hi, Can anyone tell me the diff. betn. nvarchar & varchar , and int & number datatypes in SQL 2000 Server database. Also I want to change the length of the data field of int datatype from 8 to 10, but I'm not able to change it. Thanx & Regards. Success is not a Destination, ... But a Journey !!
The difference in varchar and nvarchar datatypes is simple. Nvarchar stores UNICODE data. If you have requirements to store UNICODE or multilingual data, nvarchar is your choice. Varchar stores ASCII data and should be your data type of choice for normal use. UNICODE requires 2 bytes for each character you store. ASCII only requires 1 byte for each character. This is important because of the row size limitations of Sql Server is the same as the page size limit, which is 8060 bytes. This means a single row of a single varchar column can be varchar(8000), but a single row of a single nvarchar column can only be nvarchar (4000). check this link http://www.aspfaq.com/show.asp?id=2214[^]
-
Hi, Can anyone tell me the diff. betn. nvarchar & varchar , and int & number datatypes in SQL 2000 Server database. Also I want to change the length of the data field of int datatype from 8 to 10, but I'm not able to change it. Thanx & Regards. Success is not a Destination, ... But a Journey !!
Length of int type is fixed.
-
Hi, Can anyone tell me the diff. betn. nvarchar & varchar , and int & number datatypes in SQL 2000 Server database. Also I want to change the length of the data field of int datatype from 8 to 10, but I'm not able to change it. Thanx & Regards. Success is not a Destination, ... But a Journey !!
Vikrant Badhai wrote:
Also I want to change the length of the data field of int datatype from 8 to 10, but I'm not able to change it.
An
int
is a 32bit integer. Range -2billion to +2billion (roughly). If you want anything larger then use abigint
"On two occasions, I have been asked [by members of Parliament], 'Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out?' I am not able to rightly apprehend the kind of confusion of ideas that could provoke such a question." --Charles Babbage (1791-1871) My: Website | Blog
-
Hi, Can anyone tell me the diff. betn. nvarchar & varchar , and int & number datatypes in SQL 2000 Server database. Also I want to change the length of the data field of int datatype from 8 to 10, but I'm not able to change it. Thanx & Regards. Success is not a Destination, ... But a Journey !!
Mixing nvarchar and varchar on the same table / view can produce some strange results with matching strings in TSQL as the length is different in the database. If your only using your db locally use varchar if you have international client / users and want to use multiple languages use nvarchar.