table 1 is my current table. newtable is what needs to be insert into.
Here's the example: Table 1
a
b
c
d
newTable
a
a
a
a
b
b
b
b
b
c
c
c
c
c
d
d
d
d
table 1 is my current table. newtable is what needs to be insert into.
Here's the example: Table 1
a
b
c
d
newTable
a
a
a
a
b
b
b
b
b
c
c
c
c
c
d
d
d
d
Try this in Oracle:
SELECT x, LEVEL from myTable t
CONNECT BY LEVEL <= ROUND(DBMS_RANDOM.VALUE (4, 5))
and prior x = x
and prior sys_guid() is not null;
If you are using mysql;
select * from table order by rand() limit 3
then
Insert it into new new table
Do it many times as you want.
You can follow previous post
Thank You,
Sameera