Field Data Types in SQL SERVER


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 5 of 5

Thread: Field Data Types in SQL SERVER

  1. #1
    Larry Hunter Guest

    Field Data Types in SQL SERVER



    Hi -

    I am working to upgrade an ACCESS system to SQL Server 7 and I had a question
    about the use of certain data types in SQL Server tables.

    In selecting the proper data type to hold textual data which is more efficient
    "VarChar" or "nVarChar"? The amount of data to be held in these fields will
    never exceed 1000 characters.

    Many thanks for any insights

    Larry

  2. #2
    D. Patrick Hoerter Guest

    Re: Field Data Types in SQL SERVER

    Larry,

    use varchar for non-Unicode, and nvarchar for Unicode. The storage
    requirements for a Unicode (nvarchar) are twice as large as for a
    non-Unicode (varchar).

    Regards,
    D. Patrick Hoerter

    Larry Hunter wrote in message <38ce6b9f$1@news.devx.com>...
    >
    >
    >Hi -
    >
    >I am working to upgrade an ACCESS system to SQL Server 7 and I had a

    question
    >about the use of certain data types in SQL Server tables.
    >
    >In selecting the proper data type to hold textual data which is more

    efficient
    >"VarChar" or "nVarChar"? The amount of data to be held in these fields

    will
    >never exceed 1000 characters.
    >
    >Many thanks for any insights
    >
    >Larry



  3. #3
    C. E. Buttles Guest

    Re: Field Data Types in SQL SERVER

    Welcome back! Hope all is well.

    "D. Patrick Hoerter" <dphwebAT@bellatlanticDOT.net> wrote in message
    news:38d44c6e$1@news.devx.com...
    > Larry,
    >
    > use varchar for non-Unicode, and nvarchar for Unicode. The storage
    > requirements for a Unicode (nvarchar) are twice as large as for a
    > non-Unicode (varchar).
    >
    > Regards,
    > D. Patrick Hoerter
    >
    > Larry Hunter wrote in message <38ce6b9f$1@news.devx.com>...
    > >
    > >
    > >Hi -
    > >
    > >I am working to upgrade an ACCESS system to SQL Server 7 and I had a

    > question
    > >about the use of certain data types in SQL Server tables.
    > >
    > >In selecting the proper data type to hold textual data which is more

    > efficient
    > >"VarChar" or "nVarChar"? The amount of data to be held in these fields

    > will
    > >never exceed 1000 characters.
    > >
    > >Many thanks for any insights
    > >
    > >Larry

    >



  4. #4
    D. Patrick Hoerter Guest

    Re: Field Data Types in SQL SERVER

    C.E.,

    Thanks! It's great to be back...I moved, so I was offline for a little
    while during the transition. Now I'm settled in, so I should be in here
    often again.

    Thanks,
    D. Patrick Hoerter


    C. E. Buttles wrote in message <38d65355$1@news.devx.com>...
    >Welcome back! Hope all is well.
    >
    >"D. Patrick Hoerter" <dphwebAT@bellatlanticDOT.net> wrote in message
    >news:38d44c6e$1@news.devx.com...
    >> Larry,
    >>
    >> use varchar for non-Unicode, and nvarchar for Unicode. The storage
    >> requirements for a Unicode (nvarchar) are twice as large as for a
    >> non-Unicode (varchar).
    >>
    >> Regards,
    >> D. Patrick Hoerter
    >>
    >> Larry Hunter wrote in message <38ce6b9f$1@news.devx.com>...
    >> >
    >> >
    >> >Hi -
    >> >
    >> >I am working to upgrade an ACCESS system to SQL Server 7 and I had a

    >> question
    >> >about the use of certain data types in SQL Server tables.
    >> >
    >> >In selecting the proper data type to hold textual data which is more

    >> efficient
    >> >"VarChar" or "nVarChar"? The amount of data to be held in these fields

    >> will
    >> >never exceed 1000 characters.
    >> >
    >> >Many thanks for any insights
    >> >
    >> >Larry

    >>

    >



  5. #5
    Joe Gerstl Guest

    Re: Field Data Types in SQL SERVER


    When would I need to use Unicode? Is it required to stored data from a double-byte
    character set??

    "D. Patrick Hoerter" <dphwebAT@bellatlanticDOT.net> wrote:
    >C.E.,
    >
    > Thanks! It's great to be back...I moved, so I was offline for a little
    >while during the transition. Now I'm settled in, so I should be in here
    >often again.
    >
    >Thanks,
    >D. Patrick Hoerter
    >
    >
    >C. E. Buttles wrote in message <38d65355$1@news.devx.com>...
    >>Welcome back! Hope all is well.
    >>
    >>"D. Patrick Hoerter" <dphwebAT@bellatlanticDOT.net> wrote in message
    >>news:38d44c6e$1@news.devx.com...
    >>> Larry,
    >>>
    >>> use varchar for non-Unicode, and nvarchar for Unicode. The storage
    >>> requirements for a Unicode (nvarchar) are twice as large as for a
    >>> non-Unicode (varchar).
    >>>
    >>> Regards,
    >>> D. Patrick Hoerter
    >>>
    >>> Larry Hunter wrote in message <38ce6b9f$1@news.devx.com>...
    >>> >
    >>> >
    >>> >Hi -
    >>> >
    >>> >I am working to upgrade an ACCESS system to SQL Server 7 and I had a
    >>> question
    >>> >about the use of certain data types in SQL Server tables.
    >>> >
    >>> >In selecting the proper data type to hold textual data which is more
    >>> efficient
    >>> >"VarChar" or "nVarChar"? The amount of data to be held in these fields
    >>> will
    >>> >never exceed 1000 characters.
    >>> >
    >>> >Many thanks for any insights
    >>> >
    >>> >Larry
    >>>

    >>

    >



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center