Trying to make a smaller sample database but still have the data be somewhat statistically relevant. How can I delete x % of rows from the table ? Been fooling around with the NEWID() function.
DELETE
FROM TABLE_NAME
WHERE PK IN (SELECT TOP (75) PERCENT PK
FROM TABLE_NAME
ORDER BY NEWID())
Suggestion by Martin Smith
DELETE T
FROM (SELECT TOP (75) PERCENT *
FROM TABLE_NAME
ORDER BY NEWID()) T