Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


Please give me the SP for the below scenario. I have two
tables named Table1 and Table2...I need to fetch record by
record from Table1 and insert the record in to table2 where
the value in the sno column of the table1 is even number.

Answers were Sorted based on User's Feedback



Please give me the SP for the below scenario. I have two tables named Table1 and Table2...I need to..

Answer / meenaprasanna

insert into table2(Column1,Column2) select Column1,Column2
from Table1 where Column1 %2 ='0'

Is This Answer Correct ?    14 Yes 2 No

Please give me the SP for the below scenario. I have two tables named Table1 and Table2...I need to..

Answer / mythili

insert into table2(Column1,Column2) select Column1,Column2
from Table1 where Column1 %2 ='0'

Is This Answer Correct ?    13 Yes 1 No

Please give me the SP for the below scenario. I have two tables named Table1 and Table2...I need to..

Answer / rajesh.a

insert into table2(Column1,Column2) select Column1,Column2
from Table1 where Column1%2 = 0

Is This Answer Correct ?    9 Yes 0 No

Please give me the SP for the below scenario. I have two tables named Table1 and Table2...I need to..

Answer / priyanka malondkar

First make a function like this
create function functionname(@sno int)
returns number;
declare check;
begin
check=@sno%2
if check=0
return 0;
else
return 1;


Then the query will be
declare no;
insert into Table2(a,b,c) values select (a,b,c) from Table1
where no=functionname(sno) and no=0;

Kindly check.
In case of any syntax error please excuse as i have not
checked it of sql sever.

Is This Answer Correct ?    5 Yes 1 No

Post New Answer

More SQL Server Interview Questions

Why I am getting this error when renaming a database in ms sql server?

0 Answers  


Advantages and disadvantages of stored procedures.

2 Answers   HCL,


how to find number of columns in a table in sql server 2000 and 2005 also

7 Answers   HCL, Virtusa,


What is the fastest way to permanently delete a 1 million row table named customers?

0 Answers  


What is database normalization?

7 Answers   Deloitte, Digicel, JPMorgan Chase, Verifone,


what is the main difference between after trigger and instead trigger.

2 Answers  


How check triggers in sql server?

0 Answers  


what protocol both networks use? : Sql server database administration

0 Answers  


What is an indice?

0 Answers  


Why union all is faster than union?

0 Answers  


Which is the best place or learning center for MS SQL?????In Bangladesh?????

0 Answers   TCL, Wipro,


What are the differences between left join and inner join in sql server?

0 Answers  


Categories