Skip to content

Category Archives: Databases

You are here:
  1. Home
  2. Category "Databases"

Copy structure and all entries from one table to another (or how to create copy of existing table)

Databases, MySQLBy kavecanOctober 14, 2016

Creating copy of existing MySQL table is useful when you want to prevent loose of existing data from it, or when you want to archive existing table. There are several ways to to this. One of the ways is to create new table like existing and to add same data with next two queries: CREATE…

How to reset Primary Key value of MS SQL Server table?

DatabasesBy kavecanFebruary 1, 2013

Just run following query: DBCC CHECKIDENT(‘YourTableName’, RESEED, 0) This one is often used after truncating table – under usual curcumstances without this command, next record you add will have primary key one higher than the latest added record (even you just truncated table).

© 2026. Kavecan.com. All rights reserved.
Go to Top