Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

mysql insert into select with recursive

INSERT cte_populated(id)
WITH  RECURSIVE int_seq AS (
SELECT 1 AS val
UNION ALL
SELECT val + 1
FROM int_seq
WHERE val  < 10
)
SELECT int_seq.val FROM int_seq;
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #mysql #insert #select #recursive
ADD COMMENT
Topic
Name
1+3 =