SlideShare a Scribd company logo
1 of 38
3
0 Microsoft SQL Server Overview
Installation and Configuration of SQL Server & SSMS
Data Types
Built-in Functions
5
Introduction
SQL server is a relational database management system
Editions include
 Express (Free)
 Developer (Free – for testing and development )
 Standard (License – Production )
 Enterprise (License – Production )
What is Database & DBMS ?
There are two types of dbms
Relational Non-
Relational
A DBMS is a program which enables its users to access database, manipulate
data,
reporting / representation of data
Relational database management system
Empid Ename Doj Deptno Salar
y
101 John 10 15020
102 Thomas 20 23495
Deptno Dname Location
10 Accounts
20 IT
Employee Department
What is RDBMS ?
`
What is SQL & T-SQL ?
SQL is a standard language for storing, manipulating, and retrieving data in
databases
SQL
SQL Server
Select * from products;
Transact - SQL is an extension of the SQL Languages
Microsoft SQL Server
SQL Server management studio
25
What is a data type ?
Numeric
String
Date and Time
Binary
Miscellaneous
Type of data a variable can store
Numeric Data types
Numeric
Integer
Bigint, Int, Smallint,
TinyInt,Bit
Decimal
Decimal, Money,
SmallMoney, Numeric
For example
Even within the integer category, these are host of integer data types are
available
Data Types
Category Data
Type
From To
Number Int -2147483648 2147483647
Number Bit 0 1
Number Decimal -10^38 + 1 10^38-1
Date Datetime Jan 1, 1753 Dec 31,9999
String Char Char Max len of 8000 characters(fixed
length Unicode char)
String Varchar Varchar Max len of 8000 characters
Binary Max length of 8000 byes (fixed length binary data
Numeric built-in functions
ABS
ROUND
CEILING
FLOOR
COUNT
MIN
MAX
SUM
EXP
POWER
ISNUMERIC
String - built-in functions
ABS
ROUND
CEILING
FLOOR
COUNT
MIN
MAX
SUM
EXP
POWER
ISNUMERIC
String - built-in functions
ABS
ROUND
CEILING
FLOOR
COUNT
MIN
MAX
SUM
EXP
POWER
ISNUMERIC
Date - built-in functions
CURRENT_TIMESTAMP
DATEADD
DATEDIFF
DATEFROMPARTS
DATENAME
DATEPART
DAY
GETDATE
GETUTCDATE
ISDATE
MONTH
SYSDATETIME
YEAR
Date Type functions
SELECT DATEPART (YEAR, GETDATE()) AS [Year],
DATEPART (QUARTER, GETDATE()) AS [Quarter],
DATEPART (MONTH, GETDATE()) AS [Month],
DATEPART (DayOfYear, GETDATE()) AS [DayOfYear],
DATEPART (DAY, GETDATE()) AS [Day],
DATEPART (WEEK, GETDATE()) AS [Week],
DATEPART (WEEKDAY, GETDATE()) AS [Weekday],
DATEPART (HOUR, GETDATE()) AS [Hour],
DATEPART (MINUTE, GETDATE()) AS [Minute],
DATEPART (SECOND, GETDATE()) AS [Second],
DATEPART (MILLISECOND, GETDATE()) AS [Millisecond],
DATEPART (MICROSECOND, GETDATE()) AS [Microsecond],
DATEPART (NANOSECOND, GETDATE()) AS [NanoSecond],
DATEPART (ISO_WEEK, GETDATE()) AS [ISO Week]
OPERATORS
 Arithmetic operators
 Assignment operators
 Comparison operators
 Logical operators
 String operators
 Arithmetic operators
 Assignment operators
 Comparison operators
 Logical operators
 Arithmetic operators
 Arithmetic operators
 Assignment operators
 Comparison operators
 Logical operators
 Comparison operators
 Arithmetic operators
 Assignment operators
 Comparison operators
 Logical operators
 Logical operators
AND
OR
NOT
LIKE
BETWEE
N
IN
Constraints
`
What and why of Constraints ?
Constraints are the rules enforced on the data columns of a
table
 SQL NOT NULL
 UNIQUE
 PRIMARY KEY
 FOREIGN KEY
 CHECK
 DEFAULT
`
Primary key, Unique Key, & Foreign key
Empi
d
Ename Project
#
Deptno Salary Phone #
101 John WMDM 10 15020 932-001-
4739
102 Thoma
s
HCDW 20 23495
103 Rajesh SCAS 10 148292
Deptno Dname Location
10 Accounts
20 IT
Employee
Department
Primary Key
Foreign Key
Primary Key
Unique Key
JOINS
`
Types of Joins
Constraints are the rules enforced on the data columns of a table
INNER JOIN
LEFT JOIN
RIGHT JOIN
FULL JOIN
SELF JOIN
CARTESIAN JOIN
How to drop sql server
How to drop a sql database
93
 Rounding Functions
 Aggregation
Functions
 Logical Functions
A ready to use data in SQL Server
table
1
2
Prerequisites
SQL Server and SSMS installed

More Related Content

Similar to SQL Server part 1 (6).pptx

Database Development Replication Security Maintenance Report
Database Development Replication Security Maintenance ReportDatabase Development Replication Security Maintenance Report
Database Development Replication Security Maintenance Reportnyin27
 
Pramodkumar_SQL_DBA(5YRS EXP)
Pramodkumar_SQL_DBA(5YRS EXP)Pramodkumar_SQL_DBA(5YRS EXP)
Pramodkumar_SQL_DBA(5YRS EXP)pramod singh
 
Resume_Navneet_Formatted
Resume_Navneet_FormattedResume_Navneet_Formatted
Resume_Navneet_FormattedNavneet Tiwari
 
What's New for Developers in SQL Server 2008?
What's New for Developers in SQL Server 2008?What's New for Developers in SQL Server 2008?
What's New for Developers in SQL Server 2008?ukdpe
 
SQL Server 2008 Overview
SQL Server 2008 OverviewSQL Server 2008 Overview
SQL Server 2008 OverviewEric Nelson
 
SQL on Hadoop - 12th Swiss Big Data User Group Meeting, 3rd of July, 2014, ET...
SQL on Hadoop - 12th Swiss Big Data User Group Meeting, 3rd of July, 2014, ET...SQL on Hadoop - 12th Swiss Big Data User Group Meeting, 3rd of July, 2014, ET...
SQL on Hadoop - 12th Swiss Big Data User Group Meeting, 3rd of July, 2014, ET...Romeo Kienzler
 
SQL SERVER 2008 R2 CTP
SQL SERVER 2008 R2 CTPSQL SERVER 2008 R2 CTP
SQL SERVER 2008 R2 CTPGovind S Yadav
 
Die Neuheiten in MariaDB 10.2 und MaxScale 2.1
Die Neuheiten in MariaDB 10.2 und MaxScale 2.1Die Neuheiten in MariaDB 10.2 und MaxScale 2.1
Die Neuheiten in MariaDB 10.2 und MaxScale 2.1MariaDB plc
 
MSBI ONLINE TRAINING
MSBI ONLINE TRAININGMSBI ONLINE TRAINING
MSBI ONLINE TRAININGTRAINING ICON
 
My Business Intelligence Portfolio
My Business Intelligence PortfolioMy Business Intelligence Portfolio
My Business Intelligence Portfoliolfinkel
 
What's New in MariaDB Server 10.2 and MariaDB MaxScale 2.1
What's New in MariaDB Server 10.2 and MariaDB MaxScale 2.1What's New in MariaDB Server 10.2 and MariaDB MaxScale 2.1
What's New in MariaDB Server 10.2 and MariaDB MaxScale 2.1MariaDB plc
 
What's New in MariaDB Server 10.2 and MariaDB MaxScale 2.1
What's New in MariaDB Server 10.2 and MariaDB MaxScale 2.1What's New in MariaDB Server 10.2 and MariaDB MaxScale 2.1
What's New in MariaDB Server 10.2 and MariaDB MaxScale 2.1MariaDB plc
 
Business Intelligence Portfolio
Business Intelligence PortfolioBusiness Intelligence Portfolio
Business Intelligence PortfolioChris Seebacher
 
vinay reddy resume 2yrs
vinay reddy resume 2yrsvinay reddy resume 2yrs
vinay reddy resume 2yrsVinay Reddy
 
J. Adcock Bi Portfolio
J. Adcock   Bi PortfolioJ. Adcock   Bi Portfolio
J. Adcock Bi PortfolioJerry Adcock
 

Similar to SQL Server part 1 (6).pptx (20)

Using T-SQL
Using T-SQL Using T-SQL
Using T-SQL
 
Database Development Replication Security Maintenance Report
Database Development Replication Security Maintenance ReportDatabase Development Replication Security Maintenance Report
Database Development Replication Security Maintenance Report
 
Pramodkumar_SQL_DBA(5YRS EXP)
Pramodkumar_SQL_DBA(5YRS EXP)Pramodkumar_SQL_DBA(5YRS EXP)
Pramodkumar_SQL_DBA(5YRS EXP)
 
Resume_Navneet_Formatted
Resume_Navneet_FormattedResume_Navneet_Formatted
Resume_Navneet_Formatted
 
What's New for Developers in SQL Server 2008?
What's New for Developers in SQL Server 2008?What's New for Developers in SQL Server 2008?
What's New for Developers in SQL Server 2008?
 
SQL Server 2008 Overview
SQL Server 2008 OverviewSQL Server 2008 Overview
SQL Server 2008 Overview
 
Naveen CV
Naveen CVNaveen CV
Naveen CV
 
SQL on Hadoop
SQL on HadoopSQL on Hadoop
SQL on Hadoop
 
SQL on Hadoop - 12th Swiss Big Data User Group Meeting, 3rd of July, 2014, ET...
SQL on Hadoop - 12th Swiss Big Data User Group Meeting, 3rd of July, 2014, ET...SQL on Hadoop - 12th Swiss Big Data User Group Meeting, 3rd of July, 2014, ET...
SQL on Hadoop - 12th Swiss Big Data User Group Meeting, 3rd of July, 2014, ET...
 
SQL SERVER 2008 R2 CTP
SQL SERVER 2008 R2 CTPSQL SERVER 2008 R2 CTP
SQL SERVER 2008 R2 CTP
 
Die Neuheiten in MariaDB 10.2 und MaxScale 2.1
Die Neuheiten in MariaDB 10.2 und MaxScale 2.1Die Neuheiten in MariaDB 10.2 und MaxScale 2.1
Die Neuheiten in MariaDB 10.2 und MaxScale 2.1
 
MSBI ONLINE TRAINING
MSBI ONLINE TRAININGMSBI ONLINE TRAINING
MSBI ONLINE TRAINING
 
My Business Intelligence Portfolio
My Business Intelligence PortfolioMy Business Intelligence Portfolio
My Business Intelligence Portfolio
 
Module02
Module02Module02
Module02
 
Shantkumar_Resume
Shantkumar_ResumeShantkumar_Resume
Shantkumar_Resume
 
What's New in MariaDB Server 10.2 and MariaDB MaxScale 2.1
What's New in MariaDB Server 10.2 and MariaDB MaxScale 2.1What's New in MariaDB Server 10.2 and MariaDB MaxScale 2.1
What's New in MariaDB Server 10.2 and MariaDB MaxScale 2.1
 
What's New in MariaDB Server 10.2 and MariaDB MaxScale 2.1
What's New in MariaDB Server 10.2 and MariaDB MaxScale 2.1What's New in MariaDB Server 10.2 and MariaDB MaxScale 2.1
What's New in MariaDB Server 10.2 and MariaDB MaxScale 2.1
 
Business Intelligence Portfolio
Business Intelligence PortfolioBusiness Intelligence Portfolio
Business Intelligence Portfolio
 
vinay reddy resume 2yrs
vinay reddy resume 2yrsvinay reddy resume 2yrs
vinay reddy resume 2yrs
 
J. Adcock Bi Portfolio
J. Adcock   Bi PortfolioJ. Adcock   Bi Portfolio
J. Adcock Bi Portfolio
 

More from deepneuron

full stack data science training
full stack data science trainingfull stack data science training
full stack data science trainingdeepneuron
 
project 02.pdf
project 02.pdfproject 02.pdf
project 02.pdfdeepneuron
 
Dax best practices.pdf
Dax best practices.pdfDax best practices.pdf
Dax best practices.pdfdeepneuron
 
Data model Assignment.pdf
Data model Assignment.pdfData model Assignment.pdf
Data model Assignment.pdfdeepneuron
 
Data model Assignment.pdf
Data model Assignment.pdfData model Assignment.pdf
Data model Assignment.pdfdeepneuron
 
Data model Assignment.pdf
Data model Assignment.pdfData model Assignment.pdf
Data model Assignment.pdfdeepneuron
 
Measuresof spread
Measuresof spreadMeasuresof spread
Measuresof spreaddeepneuron
 

More from deepneuron (8)

full stack data science training
full stack data science trainingfull stack data science training
full stack data science training
 
project 02.pdf
project 02.pdfproject 02.pdf
project 02.pdf
 
project01.pdf
project01.pdfproject01.pdf
project01.pdf
 
Dax best practices.pdf
Dax best practices.pdfDax best practices.pdf
Dax best practices.pdf
 
Data model Assignment.pdf
Data model Assignment.pdfData model Assignment.pdf
Data model Assignment.pdf
 
Data model Assignment.pdf
Data model Assignment.pdfData model Assignment.pdf
Data model Assignment.pdf
 
Data model Assignment.pdf
Data model Assignment.pdfData model Assignment.pdf
Data model Assignment.pdf
 
Measuresof spread
Measuresof spreadMeasuresof spread
Measuresof spread
 

Recently uploaded

RSA Conference Exhibitor List 2024 - Exhibitors Data
RSA Conference Exhibitor List 2024 - Exhibitors DataRSA Conference Exhibitor List 2024 - Exhibitors Data
RSA Conference Exhibitor List 2024 - Exhibitors DataExhibitors Data
 
Boost the utilization of your HCL environment by reevaluating use cases and f...
Boost the utilization of your HCL environment by reevaluating use cases and f...Boost the utilization of your HCL environment by reevaluating use cases and f...
Boost the utilization of your HCL environment by reevaluating use cases and f...Roland Driesen
 
M.C Lodges -- Guest House in Jhang.
M.C Lodges --  Guest House in Jhang.M.C Lodges --  Guest House in Jhang.
M.C Lodges -- Guest House in Jhang.Aaiza Hassan
 
A DAY IN THE LIFE OF A SALESMAN / WOMAN
A DAY IN THE LIFE OF A  SALESMAN / WOMANA DAY IN THE LIFE OF A  SALESMAN / WOMAN
A DAY IN THE LIFE OF A SALESMAN / WOMANIlamathiKannappan
 
A305_A2_file_Batkhuu progress report.pdf
A305_A2_file_Batkhuu progress report.pdfA305_A2_file_Batkhuu progress report.pdf
A305_A2_file_Batkhuu progress report.pdftbatkhuu1
 
Regression analysis: Simple Linear Regression Multiple Linear Regression
Regression analysis:  Simple Linear Regression Multiple Linear RegressionRegression analysis:  Simple Linear Regression Multiple Linear Regression
Regression analysis: Simple Linear Regression Multiple Linear RegressionRavindra Nath Shukla
 
The Path to Product Excellence: Avoiding Common Pitfalls and Enhancing Commun...
The Path to Product Excellence: Avoiding Common Pitfalls and Enhancing Commun...The Path to Product Excellence: Avoiding Common Pitfalls and Enhancing Commun...
The Path to Product Excellence: Avoiding Common Pitfalls and Enhancing Commun...Aggregage
 
Unlocking the Secrets of Affiliate Marketing.pdf
Unlocking the Secrets of Affiliate Marketing.pdfUnlocking the Secrets of Affiliate Marketing.pdf
Unlocking the Secrets of Affiliate Marketing.pdfOnline Income Engine
 
Call Girls Pune Just Call 9907093804 Top Class Call Girl Service Available
Call Girls Pune Just Call 9907093804 Top Class Call Girl Service AvailableCall Girls Pune Just Call 9907093804 Top Class Call Girl Service Available
Call Girls Pune Just Call 9907093804 Top Class Call Girl Service AvailableDipal Arora
 
MONA 98765-12871 CALL GIRLS IN LUDHIANA LUDHIANA CALL GIRL
MONA 98765-12871 CALL GIRLS IN LUDHIANA LUDHIANA CALL GIRLMONA 98765-12871 CALL GIRLS IN LUDHIANA LUDHIANA CALL GIRL
MONA 98765-12871 CALL GIRLS IN LUDHIANA LUDHIANA CALL GIRLSeo
 
Yaroslav Rozhankivskyy: Три складові і три передумови максимальної продуктивн...
Yaroslav Rozhankivskyy: Три складові і три передумови максимальної продуктивн...Yaroslav Rozhankivskyy: Три складові і три передумови максимальної продуктивн...
Yaroslav Rozhankivskyy: Три складові і три передумови максимальної продуктивн...Lviv Startup Club
 
VIP Call Girls In Saharaganj ( Lucknow ) 🔝 8923113531 🔝 Cash Payment (COD) 👒
VIP Call Girls In Saharaganj ( Lucknow  ) 🔝 8923113531 🔝  Cash Payment (COD) 👒VIP Call Girls In Saharaganj ( Lucknow  ) 🔝 8923113531 🔝  Cash Payment (COD) 👒
VIP Call Girls In Saharaganj ( Lucknow ) 🔝 8923113531 🔝 Cash Payment (COD) 👒anilsa9823
 
Monthly Social Media Update April 2024 pptx.pptx
Monthly Social Media Update April 2024 pptx.pptxMonthly Social Media Update April 2024 pptx.pptx
Monthly Social Media Update April 2024 pptx.pptxAndy Lambert
 
Call Girls Jp Nagar Just Call 👗 7737669865 👗 Top Class Call Girl Service Bang...
Call Girls Jp Nagar Just Call 👗 7737669865 👗 Top Class Call Girl Service Bang...Call Girls Jp Nagar Just Call 👗 7737669865 👗 Top Class Call Girl Service Bang...
Call Girls Jp Nagar Just Call 👗 7737669865 👗 Top Class Call Girl Service Bang...amitlee9823
 
9599632723 Top Call Girls in Delhi at your Door Step Available 24x7 Delhi
9599632723 Top Call Girls in Delhi at your Door Step Available 24x7 Delhi9599632723 Top Call Girls in Delhi at your Door Step Available 24x7 Delhi
9599632723 Top Call Girls in Delhi at your Door Step Available 24x7 DelhiCall Girls in Delhi
 
Call Girls Navi Mumbai Just Call 9907093804 Top Class Call Girl Service Avail...
Call Girls Navi Mumbai Just Call 9907093804 Top Class Call Girl Service Avail...Call Girls Navi Mumbai Just Call 9907093804 Top Class Call Girl Service Avail...
Call Girls Navi Mumbai Just Call 9907093804 Top Class Call Girl Service Avail...Dipal Arora
 
It will be International Nurses' Day on 12 May
It will be International Nurses' Day on 12 MayIt will be International Nurses' Day on 12 May
It will be International Nurses' Day on 12 MayNZSG
 
Insurers' journeys to build a mastery in the IoT usage
Insurers' journeys to build a mastery in the IoT usageInsurers' journeys to build a mastery in the IoT usage
Insurers' journeys to build a mastery in the IoT usageMatteo Carbone
 

Recently uploaded (20)

RSA Conference Exhibitor List 2024 - Exhibitors Data
RSA Conference Exhibitor List 2024 - Exhibitors DataRSA Conference Exhibitor List 2024 - Exhibitors Data
RSA Conference Exhibitor List 2024 - Exhibitors Data
 
Boost the utilization of your HCL environment by reevaluating use cases and f...
Boost the utilization of your HCL environment by reevaluating use cases and f...Boost the utilization of your HCL environment by reevaluating use cases and f...
Boost the utilization of your HCL environment by reevaluating use cases and f...
 
M.C Lodges -- Guest House in Jhang.
M.C Lodges --  Guest House in Jhang.M.C Lodges --  Guest House in Jhang.
M.C Lodges -- Guest House in Jhang.
 
Forklift Operations: Safety through Cartoons
Forklift Operations: Safety through CartoonsForklift Operations: Safety through Cartoons
Forklift Operations: Safety through Cartoons
 
A DAY IN THE LIFE OF A SALESMAN / WOMAN
A DAY IN THE LIFE OF A  SALESMAN / WOMANA DAY IN THE LIFE OF A  SALESMAN / WOMAN
A DAY IN THE LIFE OF A SALESMAN / WOMAN
 
A305_A2_file_Batkhuu progress report.pdf
A305_A2_file_Batkhuu progress report.pdfA305_A2_file_Batkhuu progress report.pdf
A305_A2_file_Batkhuu progress report.pdf
 
Regression analysis: Simple Linear Regression Multiple Linear Regression
Regression analysis:  Simple Linear Regression Multiple Linear RegressionRegression analysis:  Simple Linear Regression Multiple Linear Regression
Regression analysis: Simple Linear Regression Multiple Linear Regression
 
unwanted pregnancy Kit [+918133066128] Abortion Pills IN Dubai UAE Abudhabi
unwanted pregnancy Kit [+918133066128] Abortion Pills IN Dubai UAE Abudhabiunwanted pregnancy Kit [+918133066128] Abortion Pills IN Dubai UAE Abudhabi
unwanted pregnancy Kit [+918133066128] Abortion Pills IN Dubai UAE Abudhabi
 
The Path to Product Excellence: Avoiding Common Pitfalls and Enhancing Commun...
The Path to Product Excellence: Avoiding Common Pitfalls and Enhancing Commun...The Path to Product Excellence: Avoiding Common Pitfalls and Enhancing Commun...
The Path to Product Excellence: Avoiding Common Pitfalls and Enhancing Commun...
 
Unlocking the Secrets of Affiliate Marketing.pdf
Unlocking the Secrets of Affiliate Marketing.pdfUnlocking the Secrets of Affiliate Marketing.pdf
Unlocking the Secrets of Affiliate Marketing.pdf
 
Call Girls Pune Just Call 9907093804 Top Class Call Girl Service Available
Call Girls Pune Just Call 9907093804 Top Class Call Girl Service AvailableCall Girls Pune Just Call 9907093804 Top Class Call Girl Service Available
Call Girls Pune Just Call 9907093804 Top Class Call Girl Service Available
 
MONA 98765-12871 CALL GIRLS IN LUDHIANA LUDHIANA CALL GIRL
MONA 98765-12871 CALL GIRLS IN LUDHIANA LUDHIANA CALL GIRLMONA 98765-12871 CALL GIRLS IN LUDHIANA LUDHIANA CALL GIRL
MONA 98765-12871 CALL GIRLS IN LUDHIANA LUDHIANA CALL GIRL
 
Yaroslav Rozhankivskyy: Три складові і три передумови максимальної продуктивн...
Yaroslav Rozhankivskyy: Три складові і три передумови максимальної продуктивн...Yaroslav Rozhankivskyy: Три складові і три передумови максимальної продуктивн...
Yaroslav Rozhankivskyy: Три складові і три передумови максимальної продуктивн...
 
VIP Call Girls In Saharaganj ( Lucknow ) 🔝 8923113531 🔝 Cash Payment (COD) 👒
VIP Call Girls In Saharaganj ( Lucknow  ) 🔝 8923113531 🔝  Cash Payment (COD) 👒VIP Call Girls In Saharaganj ( Lucknow  ) 🔝 8923113531 🔝  Cash Payment (COD) 👒
VIP Call Girls In Saharaganj ( Lucknow ) 🔝 8923113531 🔝 Cash Payment (COD) 👒
 
Monthly Social Media Update April 2024 pptx.pptx
Monthly Social Media Update April 2024 pptx.pptxMonthly Social Media Update April 2024 pptx.pptx
Monthly Social Media Update April 2024 pptx.pptx
 
Call Girls Jp Nagar Just Call 👗 7737669865 👗 Top Class Call Girl Service Bang...
Call Girls Jp Nagar Just Call 👗 7737669865 👗 Top Class Call Girl Service Bang...Call Girls Jp Nagar Just Call 👗 7737669865 👗 Top Class Call Girl Service Bang...
Call Girls Jp Nagar Just Call 👗 7737669865 👗 Top Class Call Girl Service Bang...
 
9599632723 Top Call Girls in Delhi at your Door Step Available 24x7 Delhi
9599632723 Top Call Girls in Delhi at your Door Step Available 24x7 Delhi9599632723 Top Call Girls in Delhi at your Door Step Available 24x7 Delhi
9599632723 Top Call Girls in Delhi at your Door Step Available 24x7 Delhi
 
Call Girls Navi Mumbai Just Call 9907093804 Top Class Call Girl Service Avail...
Call Girls Navi Mumbai Just Call 9907093804 Top Class Call Girl Service Avail...Call Girls Navi Mumbai Just Call 9907093804 Top Class Call Girl Service Avail...
Call Girls Navi Mumbai Just Call 9907093804 Top Class Call Girl Service Avail...
 
It will be International Nurses' Day on 12 May
It will be International Nurses' Day on 12 MayIt will be International Nurses' Day on 12 May
It will be International Nurses' Day on 12 May
 
Insurers' journeys to build a mastery in the IoT usage
Insurers' journeys to build a mastery in the IoT usageInsurers' journeys to build a mastery in the IoT usage
Insurers' journeys to build a mastery in the IoT usage
 

SQL Server part 1 (6).pptx

  • 1. 3
  • 2. 0 Microsoft SQL Server Overview Installation and Configuration of SQL Server & SSMS Data Types Built-in Functions
  • 3. 5
  • 4. Introduction SQL server is a relational database management system Editions include  Express (Free)  Developer (Free – for testing and development )  Standard (License – Production )  Enterprise (License – Production )
  • 5. What is Database & DBMS ? There are two types of dbms Relational Non- Relational A DBMS is a program which enables its users to access database, manipulate data, reporting / representation of data
  • 6. Relational database management system Empid Ename Doj Deptno Salar y 101 John 10 15020 102 Thomas 20 23495 Deptno Dname Location 10 Accounts 20 IT Employee Department What is RDBMS ?
  • 7. ` What is SQL & T-SQL ? SQL is a standard language for storing, manipulating, and retrieving data in databases SQL SQL Server Select * from products; Transact - SQL is an extension of the SQL Languages
  • 8. Microsoft SQL Server SQL Server management studio
  • 9.
  • 10.
  • 11.
  • 12.
  • 13.
  • 14. 25
  • 15. What is a data type ? Numeric String Date and Time Binary Miscellaneous Type of data a variable can store
  • 16. Numeric Data types Numeric Integer Bigint, Int, Smallint, TinyInt,Bit Decimal Decimal, Money, SmallMoney, Numeric For example Even within the integer category, these are host of integer data types are available
  • 17. Data Types Category Data Type From To Number Int -2147483648 2147483647 Number Bit 0 1 Number Decimal -10^38 + 1 10^38-1 Date Datetime Jan 1, 1753 Dec 31,9999 String Char Char Max len of 8000 characters(fixed length Unicode char) String Varchar Varchar Max len of 8000 characters Binary Max length of 8000 byes (fixed length binary data
  • 19. String - built-in functions ABS ROUND CEILING FLOOR COUNT MIN MAX SUM EXP POWER ISNUMERIC
  • 20. String - built-in functions ABS ROUND CEILING FLOOR COUNT MIN MAX SUM EXP POWER ISNUMERIC
  • 21. Date - built-in functions CURRENT_TIMESTAMP DATEADD DATEDIFF DATEFROMPARTS DATENAME DATEPART DAY GETDATE GETUTCDATE ISDATE MONTH SYSDATETIME YEAR
  • 22. Date Type functions SELECT DATEPART (YEAR, GETDATE()) AS [Year], DATEPART (QUARTER, GETDATE()) AS [Quarter], DATEPART (MONTH, GETDATE()) AS [Month], DATEPART (DayOfYear, GETDATE()) AS [DayOfYear], DATEPART (DAY, GETDATE()) AS [Day], DATEPART (WEEK, GETDATE()) AS [Week], DATEPART (WEEKDAY, GETDATE()) AS [Weekday], DATEPART (HOUR, GETDATE()) AS [Hour], DATEPART (MINUTE, GETDATE()) AS [Minute], DATEPART (SECOND, GETDATE()) AS [Second], DATEPART (MILLISECOND, GETDATE()) AS [Millisecond], DATEPART (MICROSECOND, GETDATE()) AS [Microsecond], DATEPART (NANOSECOND, GETDATE()) AS [NanoSecond], DATEPART (ISO_WEEK, GETDATE()) AS [ISO Week]
  • 24.  Arithmetic operators  Assignment operators  Comparison operators  Logical operators  String operators
  • 25.  Arithmetic operators  Assignment operators  Comparison operators  Logical operators  Arithmetic operators
  • 26.  Arithmetic operators  Assignment operators  Comparison operators  Logical operators  Comparison operators
  • 27.  Arithmetic operators  Assignment operators  Comparison operators  Logical operators  Logical operators AND OR NOT LIKE BETWEE N IN
  • 29. ` What and why of Constraints ? Constraints are the rules enforced on the data columns of a table  SQL NOT NULL  UNIQUE  PRIMARY KEY  FOREIGN KEY  CHECK  DEFAULT
  • 30. ` Primary key, Unique Key, & Foreign key Empi d Ename Project # Deptno Salary Phone # 101 John WMDM 10 15020 932-001- 4739 102 Thoma s HCDW 20 23495 103 Rajesh SCAS 10 148292 Deptno Dname Location 10 Accounts 20 IT Employee Department Primary Key Foreign Key Primary Key Unique Key
  • 31. JOINS
  • 32. ` Types of Joins Constraints are the rules enforced on the data columns of a table INNER JOIN LEFT JOIN RIGHT JOIN FULL JOIN SELF JOIN CARTESIAN JOIN
  • 33. How to drop sql server
  • 34. How to drop a sql database
  • 35.
  • 36.
  • 37. 93
  • 38.  Rounding Functions  Aggregation Functions  Logical Functions A ready to use data in SQL Server table 1 2 Prerequisites SQL Server and SSMS installed