Skip to content

Instantly share code, notes, and snippets.

@AhsanSN
Created November 9, 2019 07:59
Show Gist options
  • Save AhsanSN/e0f5c58e2d5a43e63f7360575c543baa to your computer and use it in GitHub Desktop.
Save AhsanSN/e0f5c58e2d5a43e63f7360575c543baa to your computer and use it in GitHub Desktop.
DECLARE @i int = 0
WHILE @i < 50
BEGIN
SET @i = @i + 1
insert into Fuel (Fuel_type, price, Data_modified) values ('High-Octane',(FLOOR(RAND()*(200-50+1)+50)), CONCAT((FLOOR(RAND()*(12-1+1)+1)),'/', (FLOOR(RAND()*(30-1+1)+1)), '/', (FLOOR(RAND()*(2019-2000+1)+2000))))
END
/**
DELETE FROM FUEL
insert into Fuel (Fuel_type, price, Data_modified) values ('Petrol',(FLOOR(RAND()*(200-50+1)+50)), CONCAT((FLOOR(RAND()*(12-1+1)+1)),'/', (FLOOR(RAND()*(30-1+1)+1)), '/', (FLOOR(RAND()*(2019-2000+1)+2000))))
**/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment