difference between select column name from table name where
serviceid=2; and select max(column name) from table name
where serviceid=2;
IN ORACLE

Answers were Sorted based on User's Feedback



difference between select column name from table name where serviceid=2; and select max(column nam..

Answer / nishadks

Let's Say Struct of Table_Name is
Column_name Varchar, Service_id Int

Values:('AAA',2),('BBB',2),('CCC',2),('DDD',2)

ANS:
select column name from table name where
serviceid=2
ANS:
Column_name
----------------------
AAA
BBB
CCC
DDD



select max(column name) from table name
where serviceid=2;
ANS:
-------
DDD

Is This Answer Correct ?    19 Yes 2 No

difference between select column name from table name where serviceid=2; and select max(column nam..

Answer / raghu

Let's Say Struct of Table_Name is
Column_name Varchar, Service_id Int

Values:('AAA',2),('BBB',2),('CCC',2),('DDD',2)

ANS:
select column name from table name where
serviceid=2
ANS:


Column_name
----------------------
AAA
BBB
CCC
DDD
select max(column name) from table name
where serviceid=2;

ANS:
-------
AAA

Is This Answer Correct ?    2 Yes 2 No

difference between select column name from table name where serviceid=2; and select max(column nam..

Answer / manish

Let's Say Struct of Table_Name is
Column_name Varchar, Service_id Int

Values:('Z',2),('Y',2),('B',2),('C',2)

ANS:
select column name from table name where
serviceid=2
Will be 'C'

ANS:
select max(column name) from table name
where serviceid=2;
Will Be 'Z'

Is This Answer Correct ?    3 Yes 13 No

Post New Answer

More SQL Server Interview Questions

what is node in sql server?

2 Answers   CarrizalSoft Technologies, Google, NIIT, Nittany, TATA,


How to find the latest updated value in a table without sending any parameters to that query

2 Answers  


What is one of the first things you would do to increase performance of a query? For example, a boss tells you that ?a query that ran yesterday took 30 seconds, but today it takes 6 minutes?

2 Answers   Accenture, Merrill Lynch, Wipro,


How to Check if table exists in sql server?

0 Answers  


What are triggers? How do you invoke a trigger on demand?

0 Answers   Hexaware,


How will oyu test the stored procedure taking two parameters namely first name and last name returning full name?

3 Answers  


I have Two table First have UserName and second is address, in address table more than value relegated to UserName table, i want to fetch 2nd address if exist other wise 1st address access

4 Answers  


How to add a new dsn with the odbc driver for sql server?

0 Answers  


What is a mixed extent?

0 Answers  


What types of integrity are enforced by a foreign-key constraint

1 Answers  


Is truncate autocommit?

0 Answers  


Delete duplicate rows from a table without primary key by using a single query Table Employee empname salary A 200 B 300 A 200 C 400 D 500 D 500 Output should be A 200 B 300 C 400 D 500

14 Answers  


Categories