Skip to content
Advertisement

Tag: copy

MariaDB, How to copy existing records using insert?

I have a lot of existing records which I want to copy using an INSERT, for example if I have a query: The common key is biDataset, the primary key in this table is biPK which is auto incremented on each insert. Here is the table structure: What I want to do is copy all the records that exist where

How to create copy of database using backup and restore

Using SQL Server Management Studio 2012, I’m trying to create a copy of a local database. I found a few variants of solution. One of them – backup and restore database as new one – HERE. Currently create database backup with name Rewards2_bak. This copy of file place in to system catalog C:Program FilesMicrosoft SQL ServerMSSQL11.MSSQLSERVERMSSQLBackup Next step – create

SQL Copy row in a table with relations

Hope some one can help me, I would like to copy rows in same table and that table has relation to another table that I have to copy related row accordingly: Table1 I copied rows with table0Id = 3 Table1 I would like to do the same to Table2 depending to the Table1 Ids like this: Table2 Table2 As you

Advertisement