The following chart compares how Oracle and Microsoft SQL Server handle object identifiers. In most cases, you do not need to change the names of objects when migrating to SQL Server.
Oracle | Microsoft SQL Server |
---|---|
1-30 characters in length. Database names: up to 8 characters long. Database link names: up to 128 characters long. |
1-128 Unicode characters in length. Temporary table names: up to 116 characters. |
Identifier names must begin with an alphabetic character and contain alphanumeric characters, or the characters _, $, and #. | Identifier names can begin with an alphanumeric character, or an _, and they can contain virtually any character. If the identifier begins with a space, or contains characters other than _, @, #, or $, you must use [ ] (delimiters) around the identifier name. If an object begins with: @ it is a local variable. # it is a local temporary object. ## it is a global temporary object. |
Tablespace names must be unique. | Database names must be unique. |
Identifier names must be unique within user accounts (schemas). | Identifier names must be unique within database user accounts. |
Column names must be unique within tables and views. | Column names must be unique within tables and views. |
Index names must be unique within a users schema. | Index names must be unique within database table names. |