sample sql code example Example: sample in sql Using a SAMPLE clause, we can select random rows. SELECT * FROM table_name SAMPLE(10);