CREATE TABLE LIKE doesn't preserve IDENTITY
I tried the following: drop table if exists public.test; drop table if exists public.copytest; create table public.test(id IDENTITY(1,1), name varchar(80)); insert into public.test(name) VALUES ('bla'); create table public.copytest like public.test; insert into public.copytest(name) VALUES ('bla'); I get an error at the last statement because it needs the id column. Somehow, IDENTITY is not copied. Is there a way around this?
Sign up
Already have an account? Login
Welcome to the Rocket Forum!
Please log in or register:
Employee Login | Registration Member Login | RegistrationEnter your E-mail address. We'll send you an e-mail with instructions to reset your password.