• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 425
  • Last Modified:

Duplicate lines in a SQL table

Hi

I have a SQL table called Transactions with a field Transaction ID. I want to duplicate lines with a certain TransactionID. What SQL statement would I use to do this?
0
Murray Brown
Asked:
Murray Brown
1 Solution
 
Aaron ShiloCommented:
insert into Transactions
select * from Transactions
where Transactionid = id

OR

insert into Transactions
select * from Transactions
where Transactionid in (id,id,id)
0
 
Murray BrownMicrosoft Cloud Azure/Excel Solution DeveloperAuthor Commented:
Thanks
0

Featured Post

Microsoft Certification Exam 74-409

VeeamĀ® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now