Reputation: 1429
What is the Difference between varchar and varchar2 in SQL. Please explain in detail with some good example.
Upvotes: 10
Views: 20320
Reputation: 1084
Leigh Riffel on the DBA StackExchange gives the most detailed and precise overview I have read on the difference between VARCHAR and VARCHAR2: https://dba.stackexchange.com/a/1303
Upvotes: 0
Reputation: 562348
Varchar2 is specific to Oracle.
The most significant nonstandard behavior of varchar2 is that an empty string (''
) is the same as null.
In standard SQL, null is not the same as any string literal, not even the empty string.
Upvotes: 14