SlideShare une entreprise Scribd logo
1  sur  3
Télécharger pour lire hors ligne
1) What are the Differences between TRUNCATE and Delete?

  S.N   Truncate                       Delete
  o
  1     Truncate is faster             Delete is comparatively slower
  2     Removes all rows from a        Can remove specific rows with
        table                          Where clause
  3     Is DDL Command                 Is DML Command
  4     Resets identity of the table   Does not reset identity of the
                                       table
  5     Removes the data by            Removes one row at a time and
        deallocating the data pages    records an entry in the
        and logs the deallocation.     transaction log for each deleted
                                       row.
  6     Cannot be rolled back          Can be rolled back


2) What are the differences between Primary key and Unique
   key?

  S.N   Primary Key                    Unique Key
  o
  1     Creates Clustered index        Creates Non-Clustered index
  2     Null values are not allowed    Allows only one null value


3) What are the Differences between Clustered Indexes and Non-
   Clustered Indexes?



  S.N   Clustered Indexes              Non-Clustered Indexes
  o
  1     It reorders the physical       It sorts and maintain a separate
        storage of records in the      storage
        table
  2     There can be only one          More than one
        Clustered index per table
  3     The leaf nodes contain data    The leaf node contains pointer to
                                       data


4) What are the differences between Stored Procedures and User
   Defined Functions?

  S.N   Stored Procedures              User Defined Functions
  o
  1     Stored Procedure cannot be     User Defined Function can be
        used in a Select statement     used in a Select statement
2     Stored procedure supports       User Defined Function does not
        Deferred Name Resolution        support Deferred Name
                                        Resolution
  3     Stored Procedures are           User Defined Functions are
        generally used for              generally used for Computations
        performing Business Logic
  4     Stored Procedure need not       User Defined Functions should
        return a value                  return a value
  5     Stored Procedures can return    User Defined Functions cannot
        any datatype                    return Image
  6     Stored Procedures can           User Defined Functions accept
        accept more number of input     lesser number of input
        parameters than User            parameters than Stored
        Defined Functions. Stored       Procedures. UDF can have upto
        Procedures can have upto        1023 input parameters
        21000 input parameters
  7     Stored Procedures can use       Temporary Tables cannot be
        Temporary Tables                used in a User Defined Function
  8     Stored Procedures can           User Defined Functions cannot
        execute Dynamic SQL             execute Dynamic SQL
  9     Stored Procedure supports       User Defined Function does not
        error handling                  support error handling.
                                        RAISEERROR or @@ERROR are
                                        not allowed in UDFs
  10    Non-deterministic functions     Non-deterministic functions
        can be used in Stored           cannot be used in User Defined
        Procedures.                     Functions (UDFs). For example,
                                        GETDATE() cannot be used in
                                        User Defined Functions(UDFs)


5) What are the differences between Where and Having clauses?

  S.N   Where clause                    Having clause
  o
  1     It applies to individual rows   It applies to a group as a whole
  2     It selects rows before          It selects rows after grouping
        grouping
  3     It cannot contain aggregate     It can contain aggregate
        functions                       functions
  4     It can be used in select,       It is used only in select clause
        delete ,insert etc.


6) What are the differences between Union and UnionAll?

  S.N   Union                           UnionAll
  o
  1     This is used to eliminate       It will not eliminate duplicate
        duplicate rows                  rows
2     This selects only distinct rows   It selects all the values
  3     It can be used to combine         It can be used to combine
        any number of queries             maximum of 2 queries
  4     It cannot contain aggregate       It can contain aggregate
        functions                         functions


7) What is the difference between normal Select statement and a
   Cursor?

  S.N   Select statement                  Cursor
  o
  1     Select statements are used        Cursors are used for row-level
        for table-level processing        processing

Contenu connexe

En vedette

SOA Difference FAQs
SOA Difference FAQsSOA Difference FAQs
SOA Difference FAQsUmar Ali
 
Dotnet difference between questions list- 1
Dotnet difference between questions list- 1Dotnet difference between questions list- 1
Dotnet difference between questions list- 1Umar Ali
 
Silverlight difference faqs-1
Silverlight  difference faqs-1Silverlight  difference faqs-1
Silverlight difference faqs-1Umar Ali
 
Silverlight difference faqs- 2
Silverlight difference faqs- 2Silverlight difference faqs- 2
Silverlight difference faqs- 2Umar Ali
 
Software technology
Software technologySoftware technology
Software technologyUmar Ali
 
Sql server difference faqs- 5
Sql server difference faqs-  5Sql server difference faqs-  5
Sql server difference faqs- 5Umar Ali
 
Link checkers 1
Link checkers 1Link checkers 1
Link checkers 1Umar Ali
 
Important Run Commands
Important Run CommandsImportant Run Commands
Important Run CommandsUmar Ali
 
Difference between asp.net mvc 3 and asp.net mvc 4
Difference between asp.net mvc 3 and asp.net mvc 4Difference between asp.net mvc 3 and asp.net mvc 4
Difference between asp.net mvc 3 and asp.net mvc 4Umar Ali
 
Difference between asp.net web forms and asp.net mvc
Difference between asp.net web forms and asp.net mvcDifference between asp.net web forms and asp.net mvc
Difference between asp.net web forms and asp.net mvcUmar Ali
 

En vedette (10)

SOA Difference FAQs
SOA Difference FAQsSOA Difference FAQs
SOA Difference FAQs
 
Dotnet difference between questions list- 1
Dotnet difference between questions list- 1Dotnet difference between questions list- 1
Dotnet difference between questions list- 1
 
Silverlight difference faqs-1
Silverlight  difference faqs-1Silverlight  difference faqs-1
Silverlight difference faqs-1
 
Silverlight difference faqs- 2
Silverlight difference faqs- 2Silverlight difference faqs- 2
Silverlight difference faqs- 2
 
Software technology
Software technologySoftware technology
Software technology
 
Sql server difference faqs- 5
Sql server difference faqs-  5Sql server difference faqs-  5
Sql server difference faqs- 5
 
Link checkers 1
Link checkers 1Link checkers 1
Link checkers 1
 
Important Run Commands
Important Run CommandsImportant Run Commands
Important Run Commands
 
Difference between asp.net mvc 3 and asp.net mvc 4
Difference between asp.net mvc 3 and asp.net mvc 4Difference between asp.net mvc 3 and asp.net mvc 4
Difference between asp.net mvc 3 and asp.net mvc 4
 
Difference between asp.net web forms and asp.net mvc
Difference between asp.net web forms and asp.net mvcDifference between asp.net web forms and asp.net mvc
Difference between asp.net web forms and asp.net mvc
 

Similaire à Sql Server Difference FAQs Part One

Dotnet difference questions & answers Compiled-1(updated)
Dotnet difference questions & answers Compiled-1(updated) Dotnet difference questions & answers Compiled-1(updated)
Dotnet difference questions & answers Compiled-1(updated) Umar Ali
 
Dotnet difference questions and answers compiled- 1(updated-2)
Dotnet difference questions and answers compiled- 1(updated-2)Dotnet difference questions and answers compiled- 1(updated-2)
Dotnet difference questions and answers compiled- 1(updated-2)Umar Ali
 
SQL Server Difference FAQs-2
SQL Server Difference FAQs-2SQL Server Difference FAQs-2
SQL Server Difference FAQs-2Umar Ali
 
Sql interview-book
Sql interview-bookSql interview-book
Sql interview-bookVipul Wankar
 
Sql interview-book
Sql interview-bookSql interview-book
Sql interview-bookVipul Wankar
 
OOPs Difference FAQs
OOPs Difference FAQsOOPs Difference FAQs
OOPs Difference FAQsUmar Ali
 
Top 50 oracle interview questions and answers
Top 50 oracle interview questions and answersTop 50 oracle interview questions and answers
Top 50 oracle interview questions and answersNIKUL GOYAL
 
Best Pl/sql SQL Interview Questions
Best Pl/sql SQL Interview QuestionsBest Pl/sql SQL Interview Questions
Best Pl/sql SQL Interview QuestionsAshwani Pandey
 
Axapta interview questions
Axapta interview questionsAxapta interview questions
Axapta interview questionsKD420
 
C language 100 questions answers
C language 100 questions answersC language 100 questions answers
C language 100 questions answerssakshitiwari631430
 
Sql interview q&a
Sql interview q&aSql interview q&a
Sql interview q&aSyed Shah
 
Bank Question Solution-ADBA Previous Year Question for AP, ANE, AME, ADA, AE
Bank Question Solution-ADBA Previous Year Question for AP, ANE, AME, ADA, AEBank Question Solution-ADBA Previous Year Question for AP, ANE, AME, ADA, AE
Bank Question Solution-ADBA Previous Year Question for AP, ANE, AME, ADA, AEEngr. Md. Jamal Uddin Rayhan
 
ADO.NET difference faqs compiled- 1
ADO.NET difference  faqs compiled- 1ADO.NET difference  faqs compiled- 1
ADO.NET difference faqs compiled- 1Umar Ali
 
Dotnet differences compiled -1
Dotnet differences compiled -1Dotnet differences compiled -1
Dotnet differences compiled -1Umar Ali
 
Technical_Interview_Questions.pdf
Technical_Interview_Questions.pdfTechnical_Interview_Questions.pdf
Technical_Interview_Questions.pdfadityashukla939020
 

Similaire à Sql Server Difference FAQs Part One (20)

SQL Differences SQL Interview Questions
SQL Differences  SQL Interview QuestionsSQL Differences  SQL Interview Questions
SQL Differences SQL Interview Questions
 
Dotnet difference questions & answers Compiled-1(updated)
Dotnet difference questions & answers Compiled-1(updated) Dotnet difference questions & answers Compiled-1(updated)
Dotnet difference questions & answers Compiled-1(updated)
 
Dotnet difference questions and answers compiled- 1(updated-2)
Dotnet difference questions and answers compiled- 1(updated-2)Dotnet difference questions and answers compiled- 1(updated-2)
Dotnet difference questions and answers compiled- 1(updated-2)
 
SQL Server Difference FAQs-2
SQL Server Difference FAQs-2SQL Server Difference FAQs-2
SQL Server Difference FAQs-2
 
Sql interview-book
Sql interview-bookSql interview-book
Sql interview-book
 
Sql interview-book
Sql interview-bookSql interview-book
Sql interview-book
 
OOPs Difference FAQs
OOPs Difference FAQsOOPs Difference FAQs
OOPs Difference FAQs
 
Top 50 oracle interview questions and answers
Top 50 oracle interview questions and answersTop 50 oracle interview questions and answers
Top 50 oracle interview questions and answers
 
Best Pl/sql SQL Interview Questions
Best Pl/sql SQL Interview QuestionsBest Pl/sql SQL Interview Questions
Best Pl/sql SQL Interview Questions
 
Database testing
Database testingDatabase testing
Database testing
 
Axapta interview questions
Axapta interview questionsAxapta interview questions
Axapta interview questions
 
C language 100 questions answers
C language 100 questions answersC language 100 questions answers
C language 100 questions answers
 
Ch. 3.pdf
Ch. 3.pdfCh. 3.pdf
Ch. 3.pdf
 
Sql interview q&a
Sql interview q&aSql interview q&a
Sql interview q&a
 
Bank Question Solution-ADBA Previous Year Question for AP, ANE, AME, ADA, AE
Bank Question Solution-ADBA Previous Year Question for AP, ANE, AME, ADA, AEBank Question Solution-ADBA Previous Year Question for AP, ANE, AME, ADA, AE
Bank Question Solution-ADBA Previous Year Question for AP, ANE, AME, ADA, AE
 
ADO.NET difference faqs compiled- 1
ADO.NET difference  faqs compiled- 1ADO.NET difference  faqs compiled- 1
ADO.NET difference faqs compiled- 1
 
Dotnet differences compiled -1
Dotnet differences compiled -1Dotnet differences compiled -1
Dotnet differences compiled -1
 
Technical_Interview_Questions.pdf
Technical_Interview_Questions.pdfTechnical_Interview_Questions.pdf
Technical_Interview_Questions.pdf
 
Question bank unit i
Question bank unit iQuestion bank unit i
Question bank unit i
 
Nagaraju
NagarajuNagaraju
Nagaraju
 

Plus de Umar Ali

Difference between wcf and asp.net web api
Difference between wcf and asp.net web apiDifference between wcf and asp.net web api
Difference between wcf and asp.net web apiUmar Ali
 
Difference between ActionResult() and ViewResult()
Difference between ActionResult() and ViewResult()Difference between ActionResult() and ViewResult()
Difference between ActionResult() and ViewResult()Umar Ali
 
Difference between asp.net web api and asp.net mvc
Difference between asp.net web api and asp.net mvcDifference between asp.net web api and asp.net mvc
Difference between asp.net web api and asp.net mvcUmar Ali
 
ASP.NET MVC difference between questions list 1
ASP.NET MVC difference between questions list 1ASP.NET MVC difference between questions list 1
ASP.NET MVC difference between questions list 1Umar Ali
 
Affiliate Networks Sites-1
Affiliate Networks Sites-1Affiliate Networks Sites-1
Affiliate Networks Sites-1Umar Ali
 
Technical Video Training Sites- 1
Technical Video Training Sites- 1Technical Video Training Sites- 1
Technical Video Training Sites- 1Umar Ali
 
US News Sites- 1
US News Sites- 1 US News Sites- 1
US News Sites- 1 Umar Ali
 
Weak hadiths in tamil
Weak hadiths in tamilWeak hadiths in tamil
Weak hadiths in tamilUmar Ali
 
Bulughul Maram in tamil
Bulughul Maram in tamilBulughul Maram in tamil
Bulughul Maram in tamilUmar Ali
 
Indian news sites- 1
Indian news sites- 1 Indian news sites- 1
Indian news sites- 1 Umar Ali
 
Photo sharing sites- 1
Photo sharing sites- 1 Photo sharing sites- 1
Photo sharing sites- 1 Umar Ali
 
File hosting search engines
File hosting search enginesFile hosting search engines
File hosting search enginesUmar Ali
 
Ajax difference faqs compiled- 1
Ajax difference  faqs compiled- 1Ajax difference  faqs compiled- 1
Ajax difference faqs compiled- 1Umar Ali
 
.NET Differences List
.NET Differences List.NET Differences List
.NET Differences ListUmar Ali
 
Difference between ajax and silverlight
Difference between ajax and silverlightDifference between ajax and silverlight
Difference between ajax and silverlightUmar Ali
 
Difference between is and as operators in c#
Difference between is and as operators in c#Difference between is and as operators in c#
Difference between is and as operators in c#Umar Ali
 
Difference between c# generics and c++ templates
Difference between c# generics and c++ templatesDifference between c# generics and c++ templates
Difference between c# generics and c++ templatesUmar Ali
 
Var vs iEnumerable
Var vs iEnumerableVar vs iEnumerable
Var vs iEnumerableUmar Ali
 
Differences between get children() and getdescendants() methods
Differences between get children() and getdescendants() methodsDifferences between get children() and getdescendants() methods
Differences between get children() and getdescendants() methodsUmar Ali
 
Ruby on rails vs asp.net mvc
Ruby on rails vs asp.net mvcRuby on rails vs asp.net mvc
Ruby on rails vs asp.net mvcUmar Ali
 

Plus de Umar Ali (20)

Difference between wcf and asp.net web api
Difference between wcf and asp.net web apiDifference between wcf and asp.net web api
Difference between wcf and asp.net web api
 
Difference between ActionResult() and ViewResult()
Difference between ActionResult() and ViewResult()Difference between ActionResult() and ViewResult()
Difference between ActionResult() and ViewResult()
 
Difference between asp.net web api and asp.net mvc
Difference between asp.net web api and asp.net mvcDifference between asp.net web api and asp.net mvc
Difference between asp.net web api and asp.net mvc
 
ASP.NET MVC difference between questions list 1
ASP.NET MVC difference between questions list 1ASP.NET MVC difference between questions list 1
ASP.NET MVC difference between questions list 1
 
Affiliate Networks Sites-1
Affiliate Networks Sites-1Affiliate Networks Sites-1
Affiliate Networks Sites-1
 
Technical Video Training Sites- 1
Technical Video Training Sites- 1Technical Video Training Sites- 1
Technical Video Training Sites- 1
 
US News Sites- 1
US News Sites- 1 US News Sites- 1
US News Sites- 1
 
Weak hadiths in tamil
Weak hadiths in tamilWeak hadiths in tamil
Weak hadiths in tamil
 
Bulughul Maram in tamil
Bulughul Maram in tamilBulughul Maram in tamil
Bulughul Maram in tamil
 
Indian news sites- 1
Indian news sites- 1 Indian news sites- 1
Indian news sites- 1
 
Photo sharing sites- 1
Photo sharing sites- 1 Photo sharing sites- 1
Photo sharing sites- 1
 
File hosting search engines
File hosting search enginesFile hosting search engines
File hosting search engines
 
Ajax difference faqs compiled- 1
Ajax difference  faqs compiled- 1Ajax difference  faqs compiled- 1
Ajax difference faqs compiled- 1
 
.NET Differences List
.NET Differences List.NET Differences List
.NET Differences List
 
Difference between ajax and silverlight
Difference between ajax and silverlightDifference between ajax and silverlight
Difference between ajax and silverlight
 
Difference between is and as operators in c#
Difference between is and as operators in c#Difference between is and as operators in c#
Difference between is and as operators in c#
 
Difference between c# generics and c++ templates
Difference between c# generics and c++ templatesDifference between c# generics and c++ templates
Difference between c# generics and c++ templates
 
Var vs iEnumerable
Var vs iEnumerableVar vs iEnumerable
Var vs iEnumerable
 
Differences between get children() and getdescendants() methods
Differences between get children() and getdescendants() methodsDifferences between get children() and getdescendants() methods
Differences between get children() and getdescendants() methods
 
Ruby on rails vs asp.net mvc
Ruby on rails vs asp.net mvcRuby on rails vs asp.net mvc
Ruby on rails vs asp.net mvc
 

Dernier

Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAndikSusilo4
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?XfilesPro
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 

Dernier (20)

Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & Application
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 

Sql Server Difference FAQs Part One

  • 1. 1) What are the Differences between TRUNCATE and Delete? S.N Truncate Delete o 1 Truncate is faster Delete is comparatively slower 2 Removes all rows from a Can remove specific rows with table Where clause 3 Is DDL Command Is DML Command 4 Resets identity of the table Does not reset identity of the table 5 Removes the data by Removes one row at a time and deallocating the data pages records an entry in the and logs the deallocation. transaction log for each deleted row. 6 Cannot be rolled back Can be rolled back 2) What are the differences between Primary key and Unique key? S.N Primary Key Unique Key o 1 Creates Clustered index Creates Non-Clustered index 2 Null values are not allowed Allows only one null value 3) What are the Differences between Clustered Indexes and Non- Clustered Indexes? S.N Clustered Indexes Non-Clustered Indexes o 1 It reorders the physical It sorts and maintain a separate storage of records in the storage table 2 There can be only one More than one Clustered index per table 3 The leaf nodes contain data The leaf node contains pointer to data 4) What are the differences between Stored Procedures and User Defined Functions? S.N Stored Procedures User Defined Functions o 1 Stored Procedure cannot be User Defined Function can be used in a Select statement used in a Select statement
  • 2. 2 Stored procedure supports User Defined Function does not Deferred Name Resolution support Deferred Name Resolution 3 Stored Procedures are User Defined Functions are generally used for generally used for Computations performing Business Logic 4 Stored Procedure need not User Defined Functions should return a value return a value 5 Stored Procedures can return User Defined Functions cannot any datatype return Image 6 Stored Procedures can User Defined Functions accept accept more number of input lesser number of input parameters than User parameters than Stored Defined Functions. Stored Procedures. UDF can have upto Procedures can have upto 1023 input parameters 21000 input parameters 7 Stored Procedures can use Temporary Tables cannot be Temporary Tables used in a User Defined Function 8 Stored Procedures can User Defined Functions cannot execute Dynamic SQL execute Dynamic SQL 9 Stored Procedure supports User Defined Function does not error handling support error handling. RAISEERROR or @@ERROR are not allowed in UDFs 10 Non-deterministic functions Non-deterministic functions can be used in Stored cannot be used in User Defined Procedures. Functions (UDFs). For example, GETDATE() cannot be used in User Defined Functions(UDFs) 5) What are the differences between Where and Having clauses? S.N Where clause Having clause o 1 It applies to individual rows It applies to a group as a whole 2 It selects rows before It selects rows after grouping grouping 3 It cannot contain aggregate It can contain aggregate functions functions 4 It can be used in select, It is used only in select clause delete ,insert etc. 6) What are the differences between Union and UnionAll? S.N Union UnionAll o 1 This is used to eliminate It will not eliminate duplicate duplicate rows rows
  • 3. 2 This selects only distinct rows It selects all the values 3 It can be used to combine It can be used to combine any number of queries maximum of 2 queries 4 It cannot contain aggregate It can contain aggregate functions functions 7) What is the difference between normal Select statement and a Cursor? S.N Select statement Cursor o 1 Select statements are used Cursors are used for row-level for table-level processing processing