SlideShare une entreprise Scribd logo
1  sur  2
Télécharger pour lire hors ligne
SQL Server - Common Interview Questions and Answers Page 4




                                                                                                                                                             Search




       Aptitude ?      Reasoning ?       Verbal Ability       GK      Puzzles     Programming ?   Engineering   Medical ?   Interview   Online Test

                                                                                                                                             Ads by Google
        SQL Server - Common Interview Questions and Answers
                                                                                                                                             SQL Server
       @ : Home > Technical Interview > SQL Server Common Questions > Interview Questions
                                                                                                                                             SQL Server Manager
                                                                                                                                             SQL Server Tools




        19. What is the difference between a Local and a Global temporary table?


                 1.   A local temporary table exists only for the duration of a connection or, if defined inside a compound
                      statement, for the duration of the compound statement.

                 2.   A global temporary table remains in the database permanently, but the rows exist only within a given
                      connection. When connection is closed, the data in the global temporary table disappears. However, the
                      table definition remains with the database for access when database is opened next time.



        20. What is the STUFF function and how does it differ from the REPLACE function?


             STUFF function is used to overwrite existing characters. Using this syntax, STUFF (string_expression, start, length,
             replacement_characters), string_expression is the string that will have characters substituted, start is the starting
             position, length is the number of characters in the string that are substituted, and replacement_characters are the
             new characters interjected into the string. REPLACE function to replace existing characters of all occurrences. Using
             the syntax REPLACE (string_expression, search_string, replacement_string), where every incidence of search_string
             found in the string_expression will be replaced with replacement_string.



        21. What is PRIMARY KEY?


             A PRIMARY KEY constraint is a unique identifier for a row within a database table. Every table should have a
             primary key constraint to uniquely identify each row and only one primary key constraint can be created for each
             table. The primary key constraints are used to enforce entity integrity.



        22. What is UNIQUE KEY constraint?


             A UNIQUE constraint enforces the uniqueness of the values in a set of columns, so no duplicate values are entered.
             The unique key constraints are used to enforce entity integrity as the primary key constraints.



        23. What is FOREIGN KEY?


             A FOREIGN KEY constraint prevents any actions that would destroy links between tables with the corresponding
             data values. A foreign key in one table points to a primary key in another table. Foreign keys prevent actions that
             would leave rows with foreign key values when there are no primary keys with that value. The foreign key
             constraints are used to enforce referential integrity.



        24. What is CHECK Constraint?


             A CHECK constraint is used to limit the values that can be placed in a column. The check constraints are used to
             enforce domain integrity.


        < Prev 1      2    3    4   5    6   Next >




http://www.indiabix.com/technical/sql-server-common-questions/4[08/29/2012 4:08:03 PM]
SQL Server - Common Interview Questions and Answers Page 4




                           SQL Server Training
                Access Videos, Articles and More. Join the
                    SSWUG.ORG Community Today!
                            www.sswug.org




                                       © 2008-2012 by IndiaBIX™ Technologies. All Rights Reserved | Copyright | Terms of Use & Privacy Policy


                                                              Contact us: info@indiabix.com       Follow us on twitter!


                                                                            Bookmark to:




http://www.indiabix.com/technical/sql-server-common-questions/4[08/29/2012 4:08:03 PM]

Contenu connexe

Similaire à Sql server common interview questions and answers page 4

Sql interview question part 1
Sql interview question part 1Sql interview question part 1
Sql interview question part 1
kaashiv1
 
Sql interview question part 3
Sql interview question part 3Sql interview question part 3
Sql interview question part 3
kaashiv1
 
SQL Interview Questions and Answers for Business Analyst
SQL Interview Questions and Answers for Business AnalystSQL Interview Questions and Answers for Business Analyst
SQL Interview Questions and Answers for Business Analyst
HireQuotient
 
Sql server common interview questions and answers page 6
Sql server   common interview questions and answers page 6Sql server   common interview questions and answers page 6
Sql server common interview questions and answers page 6
Kaing Menglieng
 

Similaire à Sql server common interview questions and answers page 4 (20)

Sql interview question part 1
Sql interview question part 1Sql interview question part 1
Sql interview question part 1
 
Sql interview question part 1
Sql interview question part 1Sql interview question part 1
Sql interview question part 1
 
Sql interview question part 3
Sql interview question part 3Sql interview question part 3
Sql interview question part 3
 
SQL Interview Questions - InterviewBit.pdf
SQL Interview Questions - InterviewBit.pdfSQL Interview Questions - InterviewBit.pdf
SQL Interview Questions - InterviewBit.pdf
 
Ebook6
Ebook6Ebook6
Ebook6
 
Sql interview question part 6
Sql interview question part 6Sql interview question part 6
Sql interview question part 6
 
Ebook6
Ebook6Ebook6
Ebook6
 
Sql interview-question-part-6
Sql interview-question-part-6Sql interview-question-part-6
Sql interview-question-part-6
 
Sql interview-question-part-6
Sql interview-question-part-6Sql interview-question-part-6
Sql interview-question-part-6
 
Oracle sql demo
Oracle sql demoOracle sql demo
Oracle sql demo
 
Ebook11
Ebook11Ebook11
Ebook11
 
SQL Interview Questions and Answers for Business Analyst
SQL Interview Questions and Answers for Business AnalystSQL Interview Questions and Answers for Business Analyst
SQL Interview Questions and Answers for Business Analyst
 
Intro sql/plsql
Intro sql/plsqlIntro sql/plsql
Intro sql/plsql
 
Sql interview question part 8
Sql interview question part 8Sql interview question part 8
Sql interview question part 8
 
Ebook8
Ebook8Ebook8
Ebook8
 
Sql server common interview questions and answers page 6
Sql server   common interview questions and answers page 6Sql server   common interview questions and answers page 6
Sql server common interview questions and answers page 6
 
Top 65 SQL Interview Questions and Answers | Edureka
Top 65 SQL Interview Questions and Answers | EdurekaTop 65 SQL Interview Questions and Answers | Edureka
Top 65 SQL Interview Questions and Answers | Edureka
 
SQL EXCLUSIVE NOTES .pdf
SQL EXCLUSIVE NOTES .pdfSQL EXCLUSIVE NOTES .pdf
SQL EXCLUSIVE NOTES .pdf
 
Sqlite
SqliteSqlite
Sqlite
 
Rapid SQL Datasheet - The Intelligent IDE for SQL Development
Rapid SQL Datasheet - The Intelligent IDE for SQL DevelopmentRapid SQL Datasheet - The Intelligent IDE for SQL Development
Rapid SQL Datasheet - The Intelligent IDE for SQL Development
 

Plus de Kaing Menglieng

What is your sql server backup strategy tech_republic
What is your sql server backup strategy    tech_republicWhat is your sql server backup strategy    tech_republic
What is your sql server backup strategy tech_republic
Kaing Menglieng
 
Using sql server 2008's merge statement tech republic
Using sql server 2008's merge statement   tech republicUsing sql server 2008's merge statement   tech republic
Using sql server 2008's merge statement tech republic
Kaing Menglieng
 
Using object dependencies in sql server 2008 tech republic
Using object dependencies in sql server 2008   tech republicUsing object dependencies in sql server 2008   tech republic
Using object dependencies in sql server 2008 tech republic
Kaing Menglieng
 
Using hash fields in sql server tech republic
Using hash fields in sql server   tech republicUsing hash fields in sql server   tech republic
Using hash fields in sql server tech republic
Kaing Menglieng
 
Using grouping sets in sql server 2008 tech republic
Using grouping sets in sql server 2008   tech republicUsing grouping sets in sql server 2008   tech republic
Using grouping sets in sql server 2008 tech republic
Kaing Menglieng
 
Understand when to use user defined functions in sql server tech-republic
Understand when to use user defined functions in sql server   tech-republicUnderstand when to use user defined functions in sql server   tech-republic
Understand when to use user defined functions in sql server tech-republic
Kaing Menglieng
 
Sql server indexed views speed up your select queries part 1 - code-projec
Sql server indexed views   speed up your select queries  part 1 - code-projecSql server indexed views   speed up your select queries  part 1 - code-projec
Sql server indexed views speed up your select queries part 1 - code-projec
Kaing Menglieng
 
Sql server – query optimization – remove bookmark lookup – remove rid lookup
Sql server – query optimization – remove bookmark lookup – remove rid lookupSql server – query optimization – remove bookmark lookup – remove rid lookup
Sql server – query optimization – remove bookmark lookup – remove rid lookup
Kaing Menglieng
 
Sql server common interview questions and answers page 5
Sql server   common interview questions and answers page 5Sql server   common interview questions and answers page 5
Sql server common interview questions and answers page 5
Kaing Menglieng
 
Sql server common interview questions and answers page 2
Sql server   common interview questions and answers page 2Sql server   common interview questions and answers page 2
Sql server common interview questions and answers page 2
Kaing Menglieng
 
Sql server – 2008 – hardware and software requirements for installing sql se
Sql server – 2008 – hardware and software requirements for installing sql seSql server – 2008 – hardware and software requirements for installing sql se
Sql server – 2008 – hardware and software requirements for installing sql se
Kaing Menglieng
 
Speeding up queries with semi joins and anti-joins
Speeding up queries with semi joins and anti-joinsSpeeding up queries with semi joins and anti-joins
Speeding up queries with semi joins and anti-joins
Kaing Menglieng
 
Speed up sql server apps - visual studio magazine
Speed up sql server apps  - visual studio magazineSpeed up sql server apps  - visual studio magazine
Speed up sql server apps - visual studio magazine
Kaing Menglieng
 
See sql server graphical execution plans in action tech republic
See sql server graphical execution plans in action   tech republicSee sql server graphical execution plans in action   tech republic
See sql server graphical execution plans in action tech republic
Kaing Menglieng
 
Reviewing sql server permissions tech republic
Reviewing sql server permissions   tech republicReviewing sql server permissions   tech republic
Reviewing sql server permissions tech republic
Kaing Menglieng
 
Query optimization how to search millions of record in sql table faster -
Query optimization   how to search millions of record in sql table faster  -Query optimization   how to search millions of record in sql table faster  -
Query optimization how to search millions of record in sql table faster -
Kaing Menglieng
 
Optimize sql server queries with these advanced tuning techniques tech repu
Optimize sql server queries with these advanced tuning techniques   tech repuOptimize sql server queries with these advanced tuning techniques   tech repu
Optimize sql server queries with these advanced tuning techniques tech repu
Kaing Menglieng
 
New date datatypes in sql server 2008 tech republic
New date datatypes in sql server 2008   tech republicNew date datatypes in sql server 2008   tech republic
New date datatypes in sql server 2008 tech republic
Kaing Menglieng
 
Introduction to policy based management in sql server 2008 tech-republic
Introduction to policy based management in sql server 2008   tech-republicIntroduction to policy based management in sql server 2008   tech-republic
Introduction to policy based management in sql server 2008 tech-republic
Kaing Menglieng
 

Plus de Kaing Menglieng (20)

What is your sql server backup strategy tech_republic
What is your sql server backup strategy    tech_republicWhat is your sql server backup strategy    tech_republic
What is your sql server backup strategy tech_republic
 
Using sql server 2008's merge statement tech republic
Using sql server 2008's merge statement   tech republicUsing sql server 2008's merge statement   tech republic
Using sql server 2008's merge statement tech republic
 
Using object dependencies in sql server 2008 tech republic
Using object dependencies in sql server 2008   tech republicUsing object dependencies in sql server 2008   tech republic
Using object dependencies in sql server 2008 tech republic
 
Using hash fields in sql server tech republic
Using hash fields in sql server   tech republicUsing hash fields in sql server   tech republic
Using hash fields in sql server tech republic
 
Using grouping sets in sql server 2008 tech republic
Using grouping sets in sql server 2008   tech republicUsing grouping sets in sql server 2008   tech republic
Using grouping sets in sql server 2008 tech republic
 
Understand when to use user defined functions in sql server tech-republic
Understand when to use user defined functions in sql server   tech-republicUnderstand when to use user defined functions in sql server   tech-republic
Understand when to use user defined functions in sql server tech-republic
 
Sql server indexed views speed up your select queries part 1 - code-projec
Sql server indexed views   speed up your select queries  part 1 - code-projecSql server indexed views   speed up your select queries  part 1 - code-projec
Sql server indexed views speed up your select queries part 1 - code-projec
 
Sql server – query optimization – remove bookmark lookup – remove rid lookup
Sql server – query optimization – remove bookmark lookup – remove rid lookupSql server – query optimization – remove bookmark lookup – remove rid lookup
Sql server – query optimization – remove bookmark lookup – remove rid lookup
 
Sql server common interview questions and answers page 5
Sql server   common interview questions and answers page 5Sql server   common interview questions and answers page 5
Sql server common interview questions and answers page 5
 
Sql server common interview questions and answers page 2
Sql server   common interview questions and answers page 2Sql server   common interview questions and answers page 2
Sql server common interview questions and answers page 2
 
Sql server – 2008 – hardware and software requirements for installing sql se
Sql server – 2008 – hardware and software requirements for installing sql seSql server – 2008 – hardware and software requirements for installing sql se
Sql server – 2008 – hardware and software requirements for installing sql se
 
Speeding up queries with semi joins and anti-joins
Speeding up queries with semi joins and anti-joinsSpeeding up queries with semi joins and anti-joins
Speeding up queries with semi joins and anti-joins
 
Speed up sql
Speed up sqlSpeed up sql
Speed up sql
 
Speed up sql server apps - visual studio magazine
Speed up sql server apps  - visual studio magazineSpeed up sql server apps  - visual studio magazine
Speed up sql server apps - visual studio magazine
 
See sql server graphical execution plans in action tech republic
See sql server graphical execution plans in action   tech republicSee sql server graphical execution plans in action   tech republic
See sql server graphical execution plans in action tech republic
 
Reviewing sql server permissions tech republic
Reviewing sql server permissions   tech republicReviewing sql server permissions   tech republic
Reviewing sql server permissions tech republic
 
Query optimization how to search millions of record in sql table faster -
Query optimization   how to search millions of record in sql table faster  -Query optimization   how to search millions of record in sql table faster  -
Query optimization how to search millions of record in sql table faster -
 
Optimize sql server queries with these advanced tuning techniques tech repu
Optimize sql server queries with these advanced tuning techniques   tech repuOptimize sql server queries with these advanced tuning techniques   tech repu
Optimize sql server queries with these advanced tuning techniques tech repu
 
New date datatypes in sql server 2008 tech republic
New date datatypes in sql server 2008   tech republicNew date datatypes in sql server 2008   tech republic
New date datatypes in sql server 2008 tech republic
 
Introduction to policy based management in sql server 2008 tech-republic
Introduction to policy based management in sql server 2008   tech-republicIntroduction to policy based management in sql server 2008   tech-republic
Introduction to policy based management in sql server 2008 tech-republic
 

Sql server common interview questions and answers page 4

  • 1. SQL Server - Common Interview Questions and Answers Page 4 Search Aptitude ? Reasoning ? Verbal Ability GK Puzzles Programming ? Engineering Medical ? Interview Online Test Ads by Google SQL Server - Common Interview Questions and Answers SQL Server @ : Home > Technical Interview > SQL Server Common Questions > Interview Questions SQL Server Manager SQL Server Tools 19. What is the difference between a Local and a Global temporary table? 1. A local temporary table exists only for the duration of a connection or, if defined inside a compound statement, for the duration of the compound statement. 2. A global temporary table remains in the database permanently, but the rows exist only within a given connection. When connection is closed, the data in the global temporary table disappears. However, the table definition remains with the database for access when database is opened next time. 20. What is the STUFF function and how does it differ from the REPLACE function? STUFF function is used to overwrite existing characters. Using this syntax, STUFF (string_expression, start, length, replacement_characters), string_expression is the string that will have characters substituted, start is the starting position, length is the number of characters in the string that are substituted, and replacement_characters are the new characters interjected into the string. REPLACE function to replace existing characters of all occurrences. Using the syntax REPLACE (string_expression, search_string, replacement_string), where every incidence of search_string found in the string_expression will be replaced with replacement_string. 21. What is PRIMARY KEY? A PRIMARY KEY constraint is a unique identifier for a row within a database table. Every table should have a primary key constraint to uniquely identify each row and only one primary key constraint can be created for each table. The primary key constraints are used to enforce entity integrity. 22. What is UNIQUE KEY constraint? A UNIQUE constraint enforces the uniqueness of the values in a set of columns, so no duplicate values are entered. The unique key constraints are used to enforce entity integrity as the primary key constraints. 23. What is FOREIGN KEY? A FOREIGN KEY constraint prevents any actions that would destroy links between tables with the corresponding data values. A foreign key in one table points to a primary key in another table. Foreign keys prevent actions that would leave rows with foreign key values when there are no primary keys with that value. The foreign key constraints are used to enforce referential integrity. 24. What is CHECK Constraint? A CHECK constraint is used to limit the values that can be placed in a column. The check constraints are used to enforce domain integrity. < Prev 1 2 3 4 5 6 Next > http://www.indiabix.com/technical/sql-server-common-questions/4[08/29/2012 4:08:03 PM]
  • 2. SQL Server - Common Interview Questions and Answers Page 4 SQL Server Training Access Videos, Articles and More. Join the SSWUG.ORG Community Today! www.sswug.org © 2008-2012 by IndiaBIX™ Technologies. All Rights Reserved | Copyright | Terms of Use & Privacy Policy Contact us: info@indiabix.com Follow us on twitter! Bookmark to: http://www.indiabix.com/technical/sql-server-common-questions/4[08/29/2012 4:08:03 PM]