Skip to content
Advertisement

How to findout a number between two column in SQL Server 2008

Suppose I have table called dbo.tbl_Search

Suppose, I search for No.-205 then I would to like result like this

Because 205 No. falls between this two ids.

Note: I don’t have any other table to join with this.

I have tried this SQL but it’s bot working:

Advertisement

Answer

Using between operator you can find a records between range.

User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement