Auto Increment in SQL

PHOTO EMBED

Wed Mar 23 2022 02:54:22 GMT+0000 (Coordinated Universal Time)

Saved by @Bambibo9799

INSERT INTO newtable (year,medal) VALUES
	 (1992,23),
	 (1993,123),
	 (1994,12),
	 (1995,22),
	 (1997,35),
	 (1996,68);
	 
	
alter table newtable
add idtest serial primary key;

select *
from newtable as n 

TRUNCATE TABLE newtable RESTART IDENTITY; > reset to zero (the idtest primarykey)
content_copyCOPY