MS SQL tutorial on CONVERT and CAST functions

Publicado em: 10 Outubro 2021
no canal de: Accessible IT Software Tutorials
2,599
24

This is a Microsoft SQL tutorial video demonstrating the use of the CONVERT and CAST functions. These functions change the data types of data, variables and columns.

Complimentary videos:
Data types:    • MS SQL covering an introduction to da...  

Complimentary SQL:
select '01 Jan 2021', convert(date, '01 Jan 2021')--, convert(date, '41 Jan 2021')
, convert(char(10), '01 Jan 2021', 103), convert(char(10), cast('01 Jan 2021' as date), 103)
, convert(char(10), cast('01 Jan 2021' as date), 3)
, convert(varchar(20), getdate(), 113)
, convert(char(10), getdate(), 103), convert(varchar, getdate(), 108)
, convert(char(10), getdate(), 103) + ' ' + convert(char(5), getdate(), 108)

select convert(varchar, cast(12345.6789 as money), 0)
, convert(varchar, cast(12345.6789 as money), 1)
, convert(varchar, cast(12345.6789 as money), 2)


select distinct pe.FirstName + ' ' + pe.LastName + ' ' + CAST(pv.AverageLeadTime AS VARCHAR(5)), CONVERT(char(10), pe.ModifiedDate, 103)
from Purchasing.ProductVendor pv
inner join Person.BusinessEntityContact be on pv.BusinessEntityID = be.BusinessEntityID
inner join Person.Person pe on be.PersonID = pe.BusinessEntityID


Nesta página do site você pode assistir ao vídeo on-line MS SQL tutorial on CONVERT and CAST functions duração hora minuto segundo em boa qualidade , que foi baixado pelo usuário Accessible IT Software Tutorials 10 Outubro 2021, compartilhe o link com seus amigos e conhecidos, no youtube este vídeo já foi visto 2,599 vezes e gostou 24 espectadores. Boa visualização!