Find jobs | Jobseekers
Employer login
About us Sitemap of www.CareerRide.com Sitemap FAQ related with www.CareerRide.com FAQ Click here to Contact us Contact
       
Submit Resume Free ! | Access Resume Free !
Home Career Services Resume Services Interview questions Articles Books
Content
SQL Server part 1
SQL Server part 2
SQL Server part 3
SQL Server part 4
SQL Server part 5
SQL Server part 6
SQL Server part 7
SQL Server part 8
SQL Server part 9
SQL Server cursor
SQL Server replication
Structured query language
SQL Server architecture
SQL Server constraints
SQL Server cursors
Data Mining
Data warehousing
SQL Server DTS
SQL Server functions
SQL Server indexes
SQL Server joins
SQL Server locks
SQL Server Net integration
SQL Server optimization
SQL Server replication
SQL reporting services
SQL service broker
SQL Server stored procedures
SQL Server table
SQL Server transactions
SQL Server transactions Architecture
SQL Server triggers
SQL Server views
SQL Server XML integration
SQL Server DDL
SQL Server DML
SQL Server DCL
SQL Server identifier
SQL Server data integrity
SQL Server accessing data
SQL Server subqueries
SQL Server cube operator
SQL Server insert data
SQL Server distributed queries
SQL Server index tuning
 
ASP.NET | ADO.NET | AJAX
C#.NET | VB.NET | PHP
NET Remoting | NET Interview
  
C | C++ | Java | Oops
Data Structure | OS
   
Database concepts | Oracle
SQL Server | Biztalk | Sharepoint
Notification services
Reporting Services
Service-oriented architecture
Data warehousing | MySQL
  
Project Management 
Linux | Testing | Networking
Software engineering 
  
UML | XML | HTML | SOAP 
CSS | VBScript  | Web Services
   
CV Cover letter | Interview 
HR | Soft skills | GD 
Working from Home 
Tutorial
ASP.NET | VB.NET | C#.NET     
Remoting.NET | Web service
Remoting overview | ADO.NET
UML | Sql server 
More links
How to transfer or export SQL Server 2005 data to Excel 
Books on SQL Server
Beginners Guide to SQL Server Integration Services Using Visual Studio 2005 

SQL Server Identifier


SQL Server Identifier interview questions

<<Previous  Next>>
SQL Server Identifier - Nov 18, 2008 at 15:30 pm by Rajmeet Ghai

What is SQL Server Identifier?

Answer
Everything in a SQL server can have an identifier. Be it server, view, trigger, column etc. any database object name is an identifier. Identifiers may or may not be required for all objects.

Example:
CREATE TABLE table_name
(ID INT PRIMARY KEY
Note varchar(20));

Here, ID and Note are two identifiers for the columns. Constraints like Primary key need not have an identifier.

What are classes of identifier? Explain each class with an example i.e. regular and delimited identifier.

Answer
There are two classes of identifier. These identifiers must contain 1 to 128 characters.

Regular identifiers: they follow the rules for the format of identifiers. They are not delimited when used in transact SQL statements.

Example:
Select * from table_name Where ID =110

Delimited identifiers: they follow the rules for the format of identifiers. They may or may not be delimited when used in transact SQL statements. They are enclosed either in (“) or ([])

Example:
Select * from [table_name] Where [ID] =110

What are the Rules for Regular Identifiers?

Answer
Rules for Regular Identifiers:

These rules are dependant on database compatibility level. For a compatibility level 90, following rules may apply:

a. The first character must be of the following:

  • Letters as defined by Unicode standard 2.0 including latin and other characters from other languages.
  • Underscore (_), Hash (#) or at (@) symbol with each having a significant meaning.

b. Remaining characters can be letters (Unicode 2.0), decimal numbers, basic latin or other scripts, #, $,@ symbols.

c. Identifiers must not be keywords reserved by SQL.

d. Embedded spaces or special characters are not allowed.

<<Previous  Next>>




 
Today's Hot Jobs
C++  SQL Server
.NET  Java  Oracle
Finance  Marketing
Seekers  Employers
Copyright © 2008 CareerRide.com. All rights reserved.