SlideShare a Scribd company logo
1 of 4
Download to read offline
Katie & Emil >BI Tutorials >SQL > sql tutorial for beginners

sql tutorial for beginners


                                          Below you can find our SQL tutorial that is mostly
                                          suitable for beginnersand those who want to learn
                                          something new. It covers SQL language only that
                                          usually can be applied to any software. We will use
                                          SQL Server 2008 R2 for our examples but most
                                          examples should work in different versions. Enjoy
                                          our SQL Server Tutorial

                                         Each tutorial will have plenty of examples and
screenshots that hopefully will help those who are new to SQL digest everything much
quicker and gain understanding of the language in much shorter period of time. What we
don’t necessarily show is proper and full syntax which we believe is usually too much for
someone who just wants to learn something useful and use it in practise therefore we decided
to provide always a few real life example in each tutorial page.




SQL Tutorial
    What is a database? - Learn the basics of database concepts. I strongly recommend this
     tutorial page.
    o Normalization Process - to be created
      o Reasons for normalization - We describe three main reasons for normalization in a
          database.
    What is SQL? - Find out what is SQL and what it is used for.
    SQL Clauses list - Find out what is the correct order of SQL Clauses
    SQL SELECT - Learn how to retrieve data from table(s) using SQL Select Statement.
    SQL WHERE -Learn how to filter results/records with SQL WHERE Clause.
    SQL GROUP BY -Learn how to Group By records with SQL GROUP By Clause.
    o SQL GROUP BY with Count
    o SQL Group by Year from Date field
    SQL Union - Learn how to combine two or more queries using UNION operator
    SQL Except - Learn how to show unique results of first query excepts results of second
     query



Data Manipulation Language tutorial (DML):

Data Manipulation Language (DML) - Find out more about DML
       SQL UPDATE -In this tutorial you will learn how to update records with where and joins
        using SQL Update
       SQL INSERT multiple rows -In this tutorial you will learn how you can using SQL insert
        multiple rows at once.
       SQL INSERT DATE - In this tutorial you will learn how to insert date into a field using
        SQL INSERT
       SQL INSERT if not exists - In this tutorial you will learn how to insert row if it does not
        already exist.


       SQL Joins Examples - shows to simple examples of inner and left outer joins.


Data Definition Language tutorial (DDL):

 Data Definition language (DDL) - Find out more about DDL
 SQL CREATE TABLE

       SQL ALTER TABLE
    o     Constraints
        o   SQL Primary Key Constraint
        o   SQL Check Constraint
        o   SQL DEFAULT CONSTRAINT
        o   SQL UNIQUE Constraint
       SQL DROP Statements
    o     SQL DROP TABLE
    o     SQL DROP VIEW
    o     SQL DROP PROCEDURE
    o     SQL DROP FUNCTION
       SQL CREATE VIEW




SQL Server Tutorial

Below are articles that are more specifc to SQL Server.

SQL Server Performance tuning overview
SQL Check if column exists
SQL Check if table exists
SQL Check if record exists
SQL Check if record exists before insert
SQL Check if record exists before update
SQL Convert date and time int into datetime
SQL Check if schema exists
SQL age bands
SQL Find table size
SQL add primary key to table with existing primary key
SQL Substring function
SQL Update progress status
SQL Server Soundex
SQL Server move database to a different drive
SQL Server Shrink log file
T-SQL Current Date Using current date is one of the most common element when writing t-
sql queries
T-SQL Current Time Getting current time from a field is common requirement although not
so obvious in T-SQL
T-SQL YYYYMMDD This is one of them most common function used in data warehouses
T-SQL Month Name This is easily achieved using T-SQL function
T-SQL Last Month This is probably most often used by finance related reports
T-SQL Day Of Week Getting day of week is simple although users can complicate it. Sunday
= 1 or Monday = 1
T-SQL Find column name in database in any table

SQL Show running queries

T-SQL Check if database object exists

SQL Add Column
sql case sensitive string comparison
SQL Server orphaned users
SQL check if temp table exists
SQL Server wait for delay
SQL Update progress status
SQL Server restore database
SQL Server 2012 Add user login with sql server authantication
SQL Server 2012 AdventureWorks DW download and install
Other:
SQL Server Compressed backup without enterprise edition
SQL Server add Linked Server




The following link shows SQL Queries Examples from beginner to advanced
Sql tutorial-for-beginners-with-examples-and-sql-tutorial-pdf

More Related Content

Recently uploaded

Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptx
negromaestrong
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
ciinovamais
 

Recently uploaded (20)

Unit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxUnit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptx
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
Third Battle of Panipat detailed notes.pptx
Third Battle of Panipat detailed notes.pptxThird Battle of Panipat detailed notes.pptx
Third Battle of Panipat detailed notes.pptx
 
PROCESS RECORDING FORMAT.docx
PROCESS      RECORDING        FORMAT.docxPROCESS      RECORDING        FORMAT.docx
PROCESS RECORDING FORMAT.docx
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdf
 
Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptx
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and Modifications
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan Fellows
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentation
 
Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptx
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
Asian American Pacific Islander Month DDSD 2024.pptx
Asian American Pacific Islander Month DDSD 2024.pptxAsian American Pacific Islander Month DDSD 2024.pptx
Asian American Pacific Islander Month DDSD 2024.pptx
 
Spatium Project Simulation student brief
Spatium Project Simulation student briefSpatium Project Simulation student brief
Spatium Project Simulation student brief
 
Magic bus Group work1and 2 (Team 3).pptx
Magic bus Group work1and 2 (Team 3).pptxMagic bus Group work1and 2 (Team 3).pptx
Magic bus Group work1and 2 (Team 3).pptx
 

Featured

How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
ThinkNow
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Kurio // The Social Media Age(ncy)
 

Featured (20)

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 

Sql tutorial-for-beginners-with-examples-and-sql-tutorial-pdf

  • 1. Katie & Emil >BI Tutorials >SQL > sql tutorial for beginners sql tutorial for beginners Below you can find our SQL tutorial that is mostly suitable for beginnersand those who want to learn something new. It covers SQL language only that usually can be applied to any software. We will use SQL Server 2008 R2 for our examples but most examples should work in different versions. Enjoy our SQL Server Tutorial Each tutorial will have plenty of examples and screenshots that hopefully will help those who are new to SQL digest everything much quicker and gain understanding of the language in much shorter period of time. What we don’t necessarily show is proper and full syntax which we believe is usually too much for someone who just wants to learn something useful and use it in practise therefore we decided to provide always a few real life example in each tutorial page. SQL Tutorial  What is a database? - Learn the basics of database concepts. I strongly recommend this tutorial page. o Normalization Process - to be created o Reasons for normalization - We describe three main reasons for normalization in a database.  What is SQL? - Find out what is SQL and what it is used for.  SQL Clauses list - Find out what is the correct order of SQL Clauses  SQL SELECT - Learn how to retrieve data from table(s) using SQL Select Statement.  SQL WHERE -Learn how to filter results/records with SQL WHERE Clause.  SQL GROUP BY -Learn how to Group By records with SQL GROUP By Clause. o SQL GROUP BY with Count o SQL Group by Year from Date field  SQL Union - Learn how to combine two or more queries using UNION operator  SQL Except - Learn how to show unique results of first query excepts results of second query Data Manipulation Language tutorial (DML): Data Manipulation Language (DML) - Find out more about DML
  • 2. SQL UPDATE -In this tutorial you will learn how to update records with where and joins using SQL Update  SQL INSERT multiple rows -In this tutorial you will learn how you can using SQL insert multiple rows at once.  SQL INSERT DATE - In this tutorial you will learn how to insert date into a field using SQL INSERT  SQL INSERT if not exists - In this tutorial you will learn how to insert row if it does not already exist.  SQL Joins Examples - shows to simple examples of inner and left outer joins. Data Definition Language tutorial (DDL): Data Definition language (DDL) - Find out more about DDL  SQL CREATE TABLE  SQL ALTER TABLE o Constraints o SQL Primary Key Constraint o SQL Check Constraint o SQL DEFAULT CONSTRAINT o SQL UNIQUE Constraint  SQL DROP Statements o SQL DROP TABLE o SQL DROP VIEW o SQL DROP PROCEDURE o SQL DROP FUNCTION  SQL CREATE VIEW SQL Server Tutorial Below are articles that are more specifc to SQL Server. SQL Server Performance tuning overview SQL Check if column exists SQL Check if table exists SQL Check if record exists SQL Check if record exists before insert SQL Check if record exists before update SQL Convert date and time int into datetime SQL Check if schema exists SQL age bands
  • 3. SQL Find table size SQL add primary key to table with existing primary key SQL Substring function SQL Update progress status SQL Server Soundex SQL Server move database to a different drive SQL Server Shrink log file T-SQL Current Date Using current date is one of the most common element when writing t- sql queries T-SQL Current Time Getting current time from a field is common requirement although not so obvious in T-SQL T-SQL YYYYMMDD This is one of them most common function used in data warehouses T-SQL Month Name This is easily achieved using T-SQL function T-SQL Last Month This is probably most often used by finance related reports T-SQL Day Of Week Getting day of week is simple although users can complicate it. Sunday = 1 or Monday = 1 T-SQL Find column name in database in any table SQL Show running queries T-SQL Check if database object exists SQL Add Column sql case sensitive string comparison SQL Server orphaned users SQL check if temp table exists SQL Server wait for delay SQL Update progress status SQL Server restore database SQL Server 2012 Add user login with sql server authantication SQL Server 2012 AdventureWorks DW download and install Other: SQL Server Compressed backup without enterprise edition SQL Server add Linked Server The following link shows SQL Queries Examples from beginner to advanced