I'd like to make a sql table something like
I want to insert 80 data records in my SQL databse with the same ID number.
How can i overcome this sql database?
On
https://www.mycompiler.io/view/2iyUuEg2ZOM ?
CREATE TABLE IF NOT EXISTS mytable (
ID INT DEFAULT 1,
SN VARCHAR DEFAULT 'PKR123...',
RESULT1 VARCHAR,
RESULT2 VARCHAR,
RESULT3 VARCHAR
);
INSERT INTO mytable (RESULT1, RESULT2, RESULT3) VALUES ('I', 'I', 'I');
INSERT INTO mytable (RESULT1, RESULT2, RESULT3) VALUES ('I', 'I', 'I');
INSERT INTO mytable (RESULT1, RESULT2, RESULT3) VALUES ('I', 'I', 'I');
INSERT INTO mytable (RESULT1, RESULT2, RESULT3) VALUES ('I', 'I', 'I');
select * from mytable
How about a row generator?
Sample table:
INSERTstatement:Check what's being inserted:
Here's a db<>fiddle session, if you want to have a quick look.