SQL Server | How to get only int values in sql | Sql Server Interview Part 36

preview_player
Показать описание

For SQL Quiz-

Find Us On FaceBook-

Query--

CREATE TABLE PART36
(
ID INT,
VALUE VARCHAR(100)
)

INSERT INTO PART36 VALUES(101,'ABC'),(102,'11.14'),(103,'1'),(104,'2'),(105,'1:05'),(106,'CDC'),(107,'2019-01-01'),(108,'45')

select *
from PART36
where TRY_PARSE(value as int) is not null
Рекомендации по теме
Комментарии
Автор

What an beautiful explanation. I am trying to watch all videos whenever have time. Share these kind of videos would be helpful to us. Great Sir

RaMeShBaBu-gfwc
Автор

Thank you, just what I was looking for.

kaimiller
Автор

Better trick, but it impact on performance

Muni
Автор

Sir can you please provide the list of all functions in SQL

narayanagottipati
visit shbcf.ru