Quantcast
Channel: Forum Getting started with SQL Server
Viewing all articles
Browse latest Browse all 4729

Min and Max values from entire table

$
0
0

 Hi,

 i have requirement in which i need to find the min and max values from the entire table.

See the sample data 

create table test
(
Sal1 int,
Sal2 int,
Sal3 int
)

insert into test values (100,700,5700)
insert into test values (200,3300,5300)
insert into test values (4400,1200,3500)
insert into test values (5400,5600,3100)

i want the output as 100 and 5700.. how can i achieve this in a single query. Please through some light on this topic..!

Thanking you in advance

Regards,

Balaji Prasad B


Balaji - BI Developer


Viewing all articles
Browse latest Browse all 4729

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>