Generate a random number in the range 1 - 10

前端 未结 7 1975
-上瘾入骨i
-上瘾入骨i 2020-12-04 11:32

Since my approach for a test query which I worked on in this question did not work out, I\'m trying something else now. Is there a way to tell pg\'s random() fu

相关标签:
7条回答
  • 2020-12-04 12:06

    Actually I don't know you want to this.

    try this

    INSERT INTO my_table (my_column)
    SELECT
        (random() * 10) + 1
    ;
    
    0 讨论(0)
提交回复
热议问题