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.

Answer Posted / meenaprasanna

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

Is This Answer Correct ?    14 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

If you lose rights to your sql server instance what are the options to connect to sql server instance? : sql server security

1033


What will be the value of @@fetch_status if a row that was a part of the cursor resultset has been deleted from the database after the time the stored procedure that opened the cursor was executed?

1138


How many non clustered indexes there can be on table ?

920


What is indexed view? How to create it?

999


What is function of master database?

114


What is default constraint in ms sql server?

1033


How to insert a new row into a table with "insert into" statements in ms sql server?

971


How to handle error or exception in sql?

982


What does COMMIT command do?

1059


How do you debug a procedure in sql server?

940


What is clustered vs nonclustered index?

942


What are the differences between user defined functions and stored procedures?

1070


Write an sql query to find first weekday of the month?

914


Tell me about the approaches which you used to counter the DI problems.

1348


Explain the truncate command? : SQL Server Architecture

1168