GeekInterview.com
   Home |  Tech FAQ  |   Interview Questions |  Placement Papers |  Tech Articles |  Learn |  Freelance Projects |  Online Testing |  Geeks Talk |  Job Postings |  Knowledge Base | Site Search |  Add/Ask Question

GeekInterview.com  >  Interview Questions  >  Oracle  >  SQL
Go To First  |  Previous Question  |  Next Question 
 SQL  |  Question 98 of 170    Print  
What is difference between Varchar2 and Nvarchar2?

  
Total Answers and Comments: 2 Last Update: July 18, 2008     Asked by: Ram Manohar Kumar 
  
 Sponsored Links

 
 Best Rated Answer

No best answer available. Please pick the good answer available or submit your answer.
September 11, 2006 11:23:44   #1  
Sibi John        

RE: What is difference between Varchar2 and Nvarchar2?...

Varchar2(s) is used to define a variable length character of maximum size s.

Nvarchar2: Same as VARCHAR2 except that the column stores values in the National CS ie you can store values in Bangla if your National CS is BN8BSCII .If the National CS is of fixed width CS (all characters are represented by a fixed byte say 2 bytes for JA16EUCFIXED) then NVARCHAR2(30) stores 30 Characters.

If the National CS is of variable width CS (some characters are represented by 1 byte some by 2 bytes as in UTF8 ) then NVARCHAR2(30) stores 30 bytes.
The maximum column size allowed is 4000 bytes.
Ex: CREATE TABLE tab1 (col1 NVARCHAR2(2000)); will create a table with one NVARCHAR2 column of 2000 characters in length (stored as 4000 bytes because each character takes two bytes) using JA16EUCFIXED as the national character set:

 
Is this answer useful? Yes | No
September 12, 2006 04:58:52   #2  
Jai Prakash Vishwakarma        

RE: What is difference between Varchar2 and Nvarchar2?...
SQL Server provides both datatypes to store character information. For the most part the two datatypes are identical in how you would work with them within SQL Server or from an application. The difference is that nvarchar is used to store unicode data which is used to store multilingual data in your database tables. Other languages have an extended set of character codes that need to be saved and this datatype allows for this extension. If your database will not be storing multilingual data you should use the varchar datatype instead. The reason for this is that nvarchar takes twice as much space as varchar this is because of the need to store the extended character codes for other languages.
 
Is this answer useful? Yes | No

 Related Questions

Rename is a permanent name given to a table or column whereas Alias is a temporary name given to a table or column which do not exist once the SQL statement is executed. 
Latest Answer : Rename means give the new name to existed objects alise is use to refrence to objects ...

A table can have only one PRIMARY KEY whereas there can be any number of UNIQUE keys. The columns that compose PK are automatically define NOT NULL, whereas a column that compose a UNIQUE is not automatically 
Latest Answer : Primay Key                     Unique key-----------                  ...

SQL*PLUS is a command line tool where as SQL and PL/SQL language interface and reporting tool. Its a command line tool that allows user to type SQL commands to be executed directly against an Oracle database. 
Latest Answer : SQL keywords cannot be abbrevated but SQL*PLUS keywords can be  abbrevated. ...

SUBSTR returns a specified portion of a string eg SUBSTR('BCDEF',4) output BCDEINSTR provides character position in which a pattern is found in a string. eg INSTR('ABC-DC-F','-',2) 
Latest Answer : hi Buddy,   Substr only give the sub part of the stringSubstr(String,'start postion','length')Substr('ABCDEFAG',3,7); /*out put is =cdefag */Instr to give only possion  of letter in use in a stringInstr(String,'letter',possition  ...

select level, min('col_name') from my_table where level = '&n' connect by prior ('col_name')  
Latest Answer : TO find out nth LOWEST value, e.g. salary from emp table without using ROWNUM & DESC/ASCSELECT DISTINCT (a.sal) FROM EMP A WHERE &N = (SELECT COUNT (DISTINCT (b.sal))                        ...

select level, max('col_name') from my_table where level = '&n' connect by prior ('col_name') >'col_name')group by level;Example:Given a table called emp with 
Latest Answer : SELECT MAX () FROM WHERE IN (SELECT TOP n FROM ORDER BY ASC)OR SELECT MIN () FROM WHERE IN (SELECT TOP n FROM ORDER BY DESC) ...

PL/SQL declares a cursor implicitly for all SQL data manipulation statements, including quries that return only one row. However,queries that return more than one row you must declare an explicit cursor 
Latest Answer : explicit ...

NO DATA FOUND is an exception raised only for the SELECT....INTO statements when the where clause of the querydoes not match any rows. When the where clause of the explicit cursor does not match any rows 
Latest Answer : NO DATA FOUND: Is an exception which is raised when no rows are retrieved from the database in a SELECT statement, then PL/SQL raises the exception NO_DATA_FOUND.%NOTFOUND: is a Boolean attribute that evaluates to TRUE if the most recent SQL statement ...

Functions are named PL/SQL blocks that return a value and can be called with arguments procedure a named block that can be called with parameter. A procedure all is a PL/SQL statement by itself, while 
Latest Answer : PROCEDURE                                                                                              ...

The variables declared in the procedure and which are passed, as arguments are called actual, the parameters in the procedure declaration. Actual parameters contain the values that are passed to a procedure 
Latest Answer : Formal Parameter: A variable declared in the parameter list of a subprogram specificationExample: create or replace procedure/function x (p_id number, p_sal number)Actual Parameter: A variable or expression refrenced in the parameter list of a subprogram ...


 Sponsored Links

 
Related Articles

Querying Data with Oracle XQuery

Querying Data with Oracle XQuery Starting with Oracle Database 10g Release 2 you can take advantage of a full featured native XQuery engine integrated with the database With Oracle XQuery you can accomplish various tasks involved in developing PHP Oracle XML applications operating on any kind of dat
 

Using Oracle XML DB Repository

Using Oracle XML DB Repository Another variation on accessing and manipulating XML content stored in Oracle database is provided by Oracle XML DB repository which is an essential component of Oracle XML DB mosgoogle NOTE Oracle XML DB repository also known as XML repository is a hierarchically organ
 

Using Oracle Database for Storing, Modifying, and Retrieving XML Data

Using Oracle Database for Storing Modifying and Retrieving XML Data With Oracle XML DB you have various XML storage and XML processing options allowing you to achieve the required level of performance and scalability One of the most interesting things about Oracle XML DB is that it allows you to per
 

XML Processing in PHP and Oracle Applications

Processing XML in PHP Oracle Applications As mentioned there are two alternatives when it comes to performing XML processing in your PHP Oracle application You can perform any required XML processing using either PHP s XML extensions or PEAR XML packages or Oracle s XML features mosgoogle In the fol
 

PHP Oracle Web Development

PHP Oracle Web Development Data processing Security Caching XML Web Services and Ajax The book is written by Yuli Vaseliev a well known author of different web development and programming books PHP Oracle Web Development Data processing Security Caching XML Web Services and Ajax is a good starting b
 

Getting Started with Oracle and ODP.NET

ODP NET Developer’ s Guide by Jagadish Chatarji Pulakhandam Sunitha Paruchuri A practical guide for developers working with the Oracle Data Provider for NET and the Oracle Developer Tools for Visual Studio 2005 Application development with ODP NET Dealing with XML DB using ODP NET Oracle
 

PHP Oracle Web Development Review

PHP Oracle Web Development Data processing Security Caching XML Web Services and Ajax The book is written by Yuli Vaseliev a well known author of different web development and programming books The author is also an expert in open source technologies and SOA Service Oriented Architecture But besides
 

Step by Step Oracle PL-SQL Tutorial

This introductory tutorial to PL SQL will help you to understand the basic concepts of PL SQL Please review the following tutorials and practice the sample SQL Statements on your local Oracle Database Please note that you must learn these basic things before we actually start getting in to Advanced
 

Working with XML in Oracle

Working with XML in Oracle Introduction to XML Extensive markup language is the language which presents data in a human readable form of text The data can be anything from a purchase order or a stock quote or weather radar or a flight schedule it can be represented using XML XML is very similar to H
 

What is Oracle Net Service

Oracle Net Services provides enterprise-wide connectivity solutions in distributed, heterogeneous computing environments. Oracle Net Services eases the complexities of network configuration and management, maximizes performance, and improves network diagnostic capabilities. Oracle Net, a component
 





About Us  |   Privacy Policy  |   Terms and Conditions  |   Contact  |   Site Map  |   Add Question  |   Propose Category  |   RSS Feeds  |   Articles Sitemap  |   Site Updates  |   Add Resource

Copyright © 2005 - 2008 GeekInterview.com. All Rights Reserved
Page copy protected against web site content infringement by Copyscape