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 Report
nyin27
 
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_Formatted
Navneet 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
 
Business Intelligence Portfolio
Business Intelligence PortfolioBusiness Intelligence Portfolio
Business Intelligence Portfolio
Chris Seebacher
 
vinay reddy resume 2yrs
vinay reddy resume 2yrsvinay reddy resume 2yrs
vinay reddy resume 2yrs
Vinay Reddy
 

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 (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

Russian Call Girls In Gurgaon ❤️8448577510 ⊹Best Escorts Service In 24/7 Delh...
Russian Call Girls In Gurgaon ❤️8448577510 ⊹Best Escorts Service In 24/7 Delh...Russian Call Girls In Gurgaon ❤️8448577510 ⊹Best Escorts Service In 24/7 Delh...
Russian Call Girls In Gurgaon ❤️8448577510 ⊹Best Escorts Service In 24/7 Delh...
lizamodels9
 
Call Girls From Pari Chowk Greater Noida ❤️8448577510 ⊹Best Escorts Service I...
Call Girls From Pari Chowk Greater Noida ❤️8448577510 ⊹Best Escorts Service I...Call Girls From Pari Chowk Greater Noida ❤️8448577510 ⊹Best Escorts Service I...
Call Girls From Pari Chowk Greater Noida ❤️8448577510 ⊹Best Escorts Service I...
lizamodels9
 
Chandigarh Escorts Service 📞8868886958📞 Just📲 Call Nihal Chandigarh Call Girl...
Chandigarh Escorts Service 📞8868886958📞 Just📲 Call Nihal Chandigarh Call Girl...Chandigarh Escorts Service 📞8868886958📞 Just📲 Call Nihal Chandigarh Call Girl...
Chandigarh Escorts Service 📞8868886958📞 Just📲 Call Nihal Chandigarh Call Girl...
Sheetaleventcompany
 
Call Girls Hebbal Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangalore
Call Girls Hebbal Just Call 👗 7737669865 👗 Top Class Call Girl Service BangaloreCall Girls Hebbal Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangalore
Call Girls Hebbal Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangalore
amitlee9823
 
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
 

Recently uploaded (20)

Russian Call Girls In Gurgaon ❤️8448577510 ⊹Best Escorts Service In 24/7 Delh...
Russian Call Girls In Gurgaon ❤️8448577510 ⊹Best Escorts Service In 24/7 Delh...Russian Call Girls In Gurgaon ❤️8448577510 ⊹Best Escorts Service In 24/7 Delh...
Russian Call Girls In Gurgaon ❤️8448577510 ⊹Best Escorts Service In 24/7 Delh...
 
Business Model Canvas (BMC)- A new venture concept
Business Model Canvas (BMC)-  A new venture conceptBusiness Model Canvas (BMC)-  A new venture concept
Business Model Canvas (BMC)- A new venture concept
 
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...
 
Call Girls From Pari Chowk Greater Noida ❤️8448577510 ⊹Best Escorts Service I...
Call Girls From Pari Chowk Greater Noida ❤️8448577510 ⊹Best Escorts Service I...Call Girls From Pari Chowk Greater Noida ❤️8448577510 ⊹Best Escorts Service I...
Call Girls From Pari Chowk Greater Noida ❤️8448577510 ⊹Best Escorts Service I...
 
Phases of Negotiation .pptx
 Phases of Negotiation .pptx Phases of Negotiation .pptx
Phases of Negotiation .pptx
 
Eluru Call Girls Service ☎ ️93326-06886 ❤️‍🔥 Enjoy 24/7 Escort Service
Eluru Call Girls Service ☎ ️93326-06886 ❤️‍🔥 Enjoy 24/7 Escort ServiceEluru Call Girls Service ☎ ️93326-06886 ❤️‍🔥 Enjoy 24/7 Escort Service
Eluru Call Girls Service ☎ ️93326-06886 ❤️‍🔥 Enjoy 24/7 Escort Service
 
Chandigarh Escorts Service 📞8868886958📞 Just📲 Call Nihal Chandigarh Call Girl...
Chandigarh Escorts Service 📞8868886958📞 Just📲 Call Nihal Chandigarh Call Girl...Chandigarh Escorts Service 📞8868886958📞 Just📲 Call Nihal Chandigarh Call Girl...
Chandigarh Escorts Service 📞8868886958📞 Just📲 Call Nihal Chandigarh Call Girl...
 
BAGALUR CALL GIRL IN 98274*61493 ❤CALL GIRLS IN ESCORT SERVICE❤CALL GIRL
BAGALUR CALL GIRL IN 98274*61493 ❤CALL GIRLS IN ESCORT SERVICE❤CALL GIRLBAGALUR CALL GIRL IN 98274*61493 ❤CALL GIRLS IN ESCORT SERVICE❤CALL GIRL
BAGALUR CALL GIRL IN 98274*61493 ❤CALL GIRLS IN ESCORT SERVICE❤CALL GIRL
 
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
 
Call Girls Hebbal Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangalore
Call Girls Hebbal Just Call 👗 7737669865 👗 Top Class Call Girl Service BangaloreCall Girls Hebbal Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangalore
Call Girls Hebbal Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangalore
 
VVVIP Call Girls In Greater Kailash ➡️ Delhi ➡️ 9999965857 🚀 No Advance 24HRS...
VVVIP Call Girls In Greater Kailash ➡️ Delhi ➡️ 9999965857 🚀 No Advance 24HRS...VVVIP Call Girls In Greater Kailash ➡️ Delhi ➡️ 9999965857 🚀 No Advance 24HRS...
VVVIP Call Girls In Greater Kailash ➡️ Delhi ➡️ 9999965857 🚀 No Advance 24HRS...
 
Falcon Invoice Discounting platform in india
Falcon Invoice Discounting platform in indiaFalcon Invoice Discounting platform in india
Falcon Invoice Discounting platform in india
 
Call Girls Zirakpur👧 Book Now📱7837612180 📞👉Call Girl Service In Zirakpur No A...
Call Girls Zirakpur👧 Book Now📱7837612180 📞👉Call Girl Service In Zirakpur No A...Call Girls Zirakpur👧 Book Now📱7837612180 📞👉Call Girl Service In Zirakpur No A...
Call Girls Zirakpur👧 Book Now📱7837612180 📞👉Call Girl Service In Zirakpur No A...
 
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
 
Call Girls Service In Old Town Dubai ((0551707352)) Old Town Dubai Call Girl ...
Call Girls Service In Old Town Dubai ((0551707352)) Old Town Dubai Call Girl ...Call Girls Service In Old Town Dubai ((0551707352)) Old Town Dubai Call Girl ...
Call Girls Service In Old Town Dubai ((0551707352)) Old Town Dubai Call Girl ...
 
Uneak White's Personal Brand Exploration Presentation
Uneak White's Personal Brand Exploration PresentationUneak White's Personal Brand Exploration Presentation
Uneak White's Personal Brand Exploration Presentation
 
B.COM Unit – 4 ( CORPORATE SOCIAL RESPONSIBILITY ( CSR ).pptx
B.COM Unit – 4 ( CORPORATE SOCIAL RESPONSIBILITY ( CSR ).pptxB.COM Unit – 4 ( CORPORATE SOCIAL RESPONSIBILITY ( CSR ).pptx
B.COM Unit – 4 ( CORPORATE SOCIAL RESPONSIBILITY ( CSR ).pptx
 
Call Girls Ludhiana Just Call 98765-12871 Top Class Call Girl Service Available
Call Girls Ludhiana Just Call 98765-12871 Top Class Call Girl Service AvailableCall Girls Ludhiana Just Call 98765-12871 Top Class Call Girl Service Available
Call Girls Ludhiana Just Call 98765-12871 Top Class Call Girl Service Available
 
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...
 
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
 

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