3
Most read
4
Most read
5
Most read
SQL Conversion Functions
By: Ms. Rubab
Rubab.itc@suk-iba.edu.pk
IBA ITC Sobhodero
Managed By Khairpur Campus,
IBA Sukkur University
By: Ms. Rubab For DIT
SQL |
Conversion
Function
By: Ms. Rubab For DIT
Implicit Data Conversion
Implicit Data-Type Conversion :
In this type of conversion the data is converted from one type to
another implicitly (by itself/automatically).
Example: from varchar to number
Varchar Number
By: Ms. Rubab For DIT
Example of Implicit conversion
Query 1: Query 2:
SELECT Fees FROM `students` WHERE fees>2000
‘Here 2000 is in number form’
Query 2:
SELECT Fees FROM `students` WHERE fees>'2000’
‘Here 2000 is in text/string form’
The output of both queries will be same because
SQL automatically converts the text to number
By: Ms. Rubab For DIT
Explicit Datatype conversion
By: Ms. Rubab For DIT
Explicit Conversion
TO_CHAR Function :
TO_CHAR function is used to typecast a numeric or date input to
character type with a format model (optional).
SYNTAX :
TO_CHAR(number1, [format], [nls_parameter])
By: Ms. Rubab For DIT

More Related Content

DOCX
Database.docx
DOCX
RDBMS.docx
DOCX
MySQL String Functions.docx
DOCX
Difference between RDBMS and DBMS.docx
PPTX
SQL Keywords and Functions.pptx
PPTX
Ms Access 1.pptx
PPTX
Lecture 4-RDBMS.pptx
PPTX
SQL Introduction.pptx
Database.docx
RDBMS.docx
MySQL String Functions.docx
Difference between RDBMS and DBMS.docx
SQL Keywords and Functions.pptx
Ms Access 1.pptx
Lecture 4-RDBMS.pptx
SQL Introduction.pptx

More from RUBAB79 (6)

PPTX
SQL Operators.pptx
PPTX
SQL Commands Part 1.pptx
PPTX
Database Lecture 3.pptx
PPTX
SQL Commands Part 3.pptx
PPTX
SQL Commands Part 2.pptx
PPTX
DATABASE Lecture 1 and 2.pptx
SQL Operators.pptx
SQL Commands Part 1.pptx
Database Lecture 3.pptx
SQL Commands Part 3.pptx
SQL Commands Part 2.pptx
DATABASE Lecture 1 and 2.pptx
Ad

Recently uploaded (20)

PDF
BP 704 T. NOVEL DRUG DELIVERY SYSTEMS (UNIT 1)
PPTX
B.Sc. DS Unit 2 Software Engineering.pptx
PPTX
CHAPTER IV. MAN AND BIOSPHERE AND ITS TOTALITY.pptx
PPTX
Unit 4 Computer Architecture Multicore Processor.pptx
PDF
Empowerment Technology for Senior High School Guide
PDF
1.3 FINAL REVISED K-10 PE and Health CG 2023 Grades 4-10 (1).pdf
PDF
medical_surgical_nursing_10th_edition_ignatavicius_TEST_BANK_pdf.pdf
PDF
My India Quiz Book_20210205121199924.pdf
PDF
Weekly quiz Compilation Jan -July 25.pdf
PDF
Τίμαιος είναι φιλοσοφικός διάλογος του Πλάτωνα
PDF
What if we spent less time fighting change, and more time building what’s rig...
PDF
AI-driven educational solutions for real-life interventions in the Philippine...
PDF
Chinmaya Tiranga quiz Grand Finale.pdf
PDF
A GUIDE TO GENETICS FOR UNDERGRADUATE MEDICAL STUDENTS
PPTX
ELIAS-SEZIURE AND EPilepsy semmioan session.pptx
PDF
Complications of Minimal Access-Surgery.pdf
PDF
HVAC Specification 2024 according to central public works department
PPTX
Computer Architecture Input Output Memory.pptx
PDF
Hazard Identification & Risk Assessment .pdf
PDF
Environmental Education MCQ BD2EE - Share Source.pdf
BP 704 T. NOVEL DRUG DELIVERY SYSTEMS (UNIT 1)
B.Sc. DS Unit 2 Software Engineering.pptx
CHAPTER IV. MAN AND BIOSPHERE AND ITS TOTALITY.pptx
Unit 4 Computer Architecture Multicore Processor.pptx
Empowerment Technology for Senior High School Guide
1.3 FINAL REVISED K-10 PE and Health CG 2023 Grades 4-10 (1).pdf
medical_surgical_nursing_10th_edition_ignatavicius_TEST_BANK_pdf.pdf
My India Quiz Book_20210205121199924.pdf
Weekly quiz Compilation Jan -July 25.pdf
Τίμαιος είναι φιλοσοφικός διάλογος του Πλάτωνα
What if we spent less time fighting change, and more time building what’s rig...
AI-driven educational solutions for real-life interventions in the Philippine...
Chinmaya Tiranga quiz Grand Finale.pdf
A GUIDE TO GENETICS FOR UNDERGRADUATE MEDICAL STUDENTS
ELIAS-SEZIURE AND EPilepsy semmioan session.pptx
Complications of Minimal Access-Surgery.pdf
HVAC Specification 2024 according to central public works department
Computer Architecture Input Output Memory.pptx
Hazard Identification & Risk Assessment .pdf
Environmental Education MCQ BD2EE - Share Source.pdf
Ad

SQL Conversion Functions.pptx

  • 1. SQL Conversion Functions By: Ms. Rubab Rubab.itc@suk-iba.edu.pk IBA ITC Sobhodero Managed By Khairpur Campus, IBA Sukkur University By: Ms. Rubab For DIT
  • 3. Implicit Data Conversion Implicit Data-Type Conversion : In this type of conversion the data is converted from one type to another implicitly (by itself/automatically). Example: from varchar to number Varchar Number By: Ms. Rubab For DIT
  • 4. Example of Implicit conversion Query 1: Query 2: SELECT Fees FROM `students` WHERE fees>2000 ‘Here 2000 is in number form’ Query 2: SELECT Fees FROM `students` WHERE fees>'2000’ ‘Here 2000 is in text/string form’ The output of both queries will be same because SQL automatically converts the text to number By: Ms. Rubab For DIT
  • 6. Explicit Conversion TO_CHAR Function : TO_CHAR function is used to typecast a numeric or date input to character type with a format model (optional). SYNTAX : TO_CHAR(number1, [format], [nls_parameter]) By: Ms. Rubab For DIT