ALLInterview.com :: Home Page KalAajKal.com
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
tip   To Refer this Site to Your Friends   Click Here
Google
 
Categories  >>  Software  >>  Databases  >>  SQL Server
 
 


 

 
 Oracle interview questions  Oracle Interview Questions
 SQL Server interview questions  SQL Server Interview Questions
 MS Access interview questions  MS Access Interview Questions
 MySQL interview questions  MySQL Interview Questions
 Postgre interview questions  Postgre Interview Questions
 Sybase interview questions  Sybase Interview Questions
 DB Architecture interview questions  DB Architecture Interview Questions
 DB Administration interview questions  DB Administration Interview Questions
 DB Development interview questions  DB Development Interview Questions
 SQL PLSQL interview questions  SQL PLSQL Interview Questions
 Databases AllOther interview questions  Databases AllOther Interview Questions
Question
how to rest identity columns in sql server
 Question Submitted By :: Dinesh Shrama
I also faced this Question!!     Rank Answer Posted By  
 
  Re: how to rest identity columns in sql server
Answer
# 1
create table t(id int identity(seed,increment))

where seed is starting number and increment is number to be
incremented.

create table t(id int identity(1,1),name varchar(50))

so the id will be start with 1 and will be incremented 1 by
1 each time when record is get insered
 
Is This Answer Correct ?    1 Yes 0 No
Muthu Kumar
 
  Re: how to rest identity columns in sql server
Answer
# 2
The identity is similar to squence object in oracle. syntax 
for identity column is
 <column-name> <data type> identity(start value,increment)
ex:
 empno int identity(100,2)

 suppose if u want to add an odd value i.e, 50; u can also 
add 
 first execute IDENTITY_INSERT ON
 and then u can insert whatever values u want. then again 
execute IDENTITY_INSERT OFF
 
Is This Answer Correct ?    0 Yes 0 No
Yvbchowdary
 
 
 
  Re: how to rest identity columns in sql server
Answer
# 3
USE AdventureWorks;
GO
DBCC CHECKIDENT ("HumanResources.Employee", RESEED, 300);
GO
 
Is This Answer Correct ?    0 Yes 0 No
Adhi
 

 
 
 
Other SQL Server Interview Questions
 
  Question Asked @ Answers
 
Which data type can be used only on OUTPUT parameters of the stored proceduer?  2
Explain sp_configure commands, set commands?  3
What is MSDE?  2
How can we write or define DDL statements in Sql server and DML statements?  2
How do you implement one-to-one, one-to-many and many-to- many relationships while designing tables? TCS3
Accidentally i deleted my table. How can i get that table?  4
what is a stored procedure and trigger?  1
Can you tell me the difference between DELETE & TRUNCATE commands?  11
what is the importence of the trigger in sqlserver2000? ATI1
1. What are the grouping function in SQL ? 2. If base table of a view deleted means, what will happen while we querying on view ? will give any error ? 3. Difference between DROP, DELETE, TRUNCATE table ? 4. What is constraints and types ? 5. What is max size of nchar & nvarchar ? 6. Define ROLLBACK, COMMIT, SAVE POINT 7. How non-clustered better ? or rank the Clustered, Non-Clustered and Table scan in performance wise 8. Select 10 rows from a table ? 9. Define DML, DDL, DCL, DTL commands ? 10. What is mean by NULL value ? NULL means "" or 0 or undefined ? 11. Default constraints ? 12. Can we have more then primary Key in table ? 13. Type of integrity ? Entity, Referential, Domain ? Perot-Systems8
what is Archive old data?  1
How reterive duplicate value in SQL?  5
Can you give an example of Stored Procedure?  2
How can count the string ? for ex: If i have string like 'bhaskar' then i need like b:1 h:1 a:2 s:1 k:1 r:1 please give any idea on that TCS5
plz send every query in sql server2000 Infosys1
What types of integrity are enforced by a foreign-key constraint  1
what is the difference between sql query and google query? TCS6
How many types of cursors are there in SQL Server? 247Customer3
CLR Integration ? what is Notification services ? Satyam1
How to give a user the option of importing Excel and a delimited text file into a SQL Server Database without manually using SQL DTS? GE1
 
For more SQL Server Interview Questions Click Here 
 
 
 
 
 
   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us interview questions urls   External Links 
   
Copyright © 2007  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  Forum9.com   ::  KalAajKal.com