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
If you lose rights to your sql server instance what are the options to connect to sql server instance? : sql server security
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?
How many non clustered indexes there can be on table ?
What is indexed view? How to create it?
What is function of master database?
What is default constraint in ms sql server?
How to insert a new row into a table with "insert into" statements in ms sql server?
How to handle error or exception in sql?
What does COMMIT command do?
How do you debug a procedure in sql server?
What is clustered vs nonclustered index?
What are the differences between user defined functions and stored procedures?
Write an sql query to find first weekday of the month?
Tell me about the approaches which you used to counter the DI problems.
Explain the truncate command? : SQL Server Architecture