Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Database & SysAdmin
  3. Database
  4. Diff. betn. nvarchar & varchar.

Diff. betn. nvarchar & varchar.

Scheduled Pinned Locked Moved Database
databasesysadmin
5 Posts 5 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • V Offline
    V Offline
    Vikrant Badhai
    wrote on last edited by
    #1

    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 !!

    A P C F 4 Replies Last reply
    0
    • V Vikrant Badhai

      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 !!

      A Offline
      A Offline
      albCode
      wrote on last edited by
      #2

      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[^]

      1 Reply Last reply
      0
      • V Vikrant Badhai

        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 !!

        P Offline
        P Offline
        Paddy Boyd
        wrote on last edited by
        #3

        Length of int type is fixed.

        1 Reply Last reply
        0
        • V Vikrant Badhai

          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 !!

          C Offline
          C Offline
          Colin Angus Mackay
          wrote on last edited by
          #4

          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 a bigint


          "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

          1 Reply Last reply
          0
          • V Vikrant Badhai

            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 !!

            F Offline
            F Offline
            Frank Kerrigan
            wrote on last edited by
            #5

            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.

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups