How do you find value of first column before inserting value
into the second column in the same table for checking that second column must have different value than first column.

Answers were Sorted based on User's Feedback



How do you find value of first column before inserting value into the second column in the same tab..

Answer / ankita upadhyay

by using lookup function
syntax-
LOOKUP(lookup_value,lookup_vector);

lookup_value-contain the name of field(like id) about which you have to find info

lookup_vector-contain a range of row or column which contain value of respective ids

Is This Answer Correct ?    2 Yes 0 No

How do you find value of first column before inserting value into the second column in the same tab..

Answer / satish

Please help me.
Does we write trigger.
Or procedure or
anything else.

Is This Answer Correct ?    0 Yes 2 No

Post New Answer

More SQL Server Interview Questions

I have a table in which phno is one of the columns.i do have some values in tht phno column.i need to update phno column values with 0(zero) as prefix.give me a correct solution plz...

7 Answers   Value Labs,


What command would you use to add a column to a table in sql server?

0 Answers  


What do you understand by a view?

0 Answers  


Following are some of the question related to below mentioned query? select e1.salary from employee3 e1 where 2= ( select count(distinct(e2.salary)) from employee3 e2 where e2.salary>=e1.salary ) 1) What the query returns? 2) How it works? - Detail explanation (what the sub query does, why it is (where 2=)....etc...Please?

5 Answers  


What is a system database and what is a user database?

0 Answers  






Well sometimes sp_reanmedb may not work you know because if some one is using the db it will not accept this command so what do you think you can do in such cases?

2 Answers  


What is isolation levels?

0 Answers  


Explain indexed view?

1 Answers  


Define views.

0 Answers  


How to create a new schema in a database?

0 Answers  


Do you know what is lock escalation?

0 Answers  


Tell me in brief how sql server enhances scalability of the database system?

0 Answers  


Categories