SlideShare a Scribd company logo
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]

More Related Content

PPTX
Ebook1
kaashiv1
 
PPTX
Extended events
Jonathan Allen
 
PPTX
Ebook3
kaashiv1
 
PPTX
SQL Server Scheduling Basics
Amit Banerjee
 
PPTX
Kaashiv SQL Server Interview Questions Presentation
kaashiv1
 
PDF
Sql server 2008 interview questions answers
Jitendra Gangwar
 
PPTX
Oracle SQL Developer for SQL Server?
Jeff Smith
 
PDF
Sql server common interview questions and answers
Kaing Menglieng
 
Ebook1
kaashiv1
 
Extended events
Jonathan Allen
 
Ebook3
kaashiv1
 
SQL Server Scheduling Basics
Amit Banerjee
 
Kaashiv SQL Server Interview Questions Presentation
kaashiv1
 
Sql server 2008 interview questions answers
Jitendra Gangwar
 
Oracle SQL Developer for SQL Server?
Jeff Smith
 
Sql server common interview questions and answers
Kaing Menglieng
 

Similar to Sql server common interview questions and answers page 4 (20)

PPTX
Sql interview question part 1
kaashiv1
 
PPTX
Sql interview question part 1
kaashiv1
 
PPTX
Sql interview question part 3
kaashiv1
 
PDF
SQL Interview Questions - InterviewBit.pdf
Aniket223719
 
PPTX
Sql interview question part 6
kaashiv1
 
PPTX
Ebook6
kaashiv1
 
PPTX
Sql interview-question-part-6
kaashiv1
 
PPTX
Ebook6
kaashiv1
 
PPTX
Sql interview-question-part-6
kaashiv1
 
PPTX
Oracle sql demo
Ramkumarsenram
 
PPTX
Ebook11
kaashiv1
 
PPTX
SQL Interview Questions and Answers for Business Analyst
HireQuotient
 
PPTX
Intro sql/plsql
Pooja Dixit
 
PDF
SQL Server Interview Questions PDF By ScholarHat
Scholarhat
 
PPT
Ebook8
kaashiv1
 
PPT
Sql interview question part 8
kaashiv1
 
PDF
Sql server common interview questions and answers page 6
Kaing Menglieng
 
PDF
Top 65 SQL Interview Questions and Answers | Edureka
Edureka!
 
PPTX
MySQL(PLSQL) Syllabus and SQL vs SQL * plus Session - 01.pptx
Paj234355
 
PDF
SQL EXCLUSIVE NOTES .pdf
NiravPanchal50
 
Sql interview question part 1
kaashiv1
 
Sql interview question part 1
kaashiv1
 
Sql interview question part 3
kaashiv1
 
SQL Interview Questions - InterviewBit.pdf
Aniket223719
 
Sql interview question part 6
kaashiv1
 
Ebook6
kaashiv1
 
Sql interview-question-part-6
kaashiv1
 
Ebook6
kaashiv1
 
Sql interview-question-part-6
kaashiv1
 
Oracle sql demo
Ramkumarsenram
 
Ebook11
kaashiv1
 
SQL Interview Questions and Answers for Business Analyst
HireQuotient
 
Intro sql/plsql
Pooja Dixit
 
SQL Server Interview Questions PDF By ScholarHat
Scholarhat
 
Ebook8
kaashiv1
 
Sql interview question part 8
kaashiv1
 
Sql server common interview questions and answers page 6
Kaing Menglieng
 
Top 65 SQL Interview Questions and Answers | Edureka
Edureka!
 
MySQL(PLSQL) Syllabus and SQL vs SQL * plus Session - 01.pptx
Paj234355
 
SQL EXCLUSIVE NOTES .pdf
NiravPanchal50
 
Ad

More from Kaing Menglieng (20)

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

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: [email protected] Follow us on twitter! Bookmark to: http://www.indiabix.com/technical/sql-server-common-questions/4[08/29/2012 4:08:03 PM]