Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <pre><code>TAB2 ----------------- col1 king Queen ---------------- 1 Alex yash 2 Jhon Shakthi 3 Fred Maya </code></pre> <hr> <pre><code>insert into TAB1(col1,col2,col3,col4, col5) select 5, -- If you are tring to use an auto incremental value, I recommend you to use a trigger and Sequence on the table 'March', 'King7', king , col1 -- Col1 is used to get an Idea which row caused the Insert From TAB2 where Queen='yash'; TAB1 -------------------------------- col1 col2 col3 col4 col5 -------------------------------- 5 March King7 Alex 1 </code></pre> <hr> <pre><code>insert into TAB1(col1,col2,col3,col4, col5) select 5, 'March', 'King7', case when Queen='yash' then king else '' end, col1 From TAB2 ; -------------------------------- col1 col2 col3 col4 col5 -------------------------------- 5 March King7 Alex 1 5 March King7 '' 2 5 March King7 '' 3 </code></pre> <hr> <pre><code>---- removing insert to Col5 column insert into TAB1(col1,col2,col3,col4) select distinct 5, 'March', 'King7', case when Queen='yash' then king else '' end From TAB2 ; -------------------------- col1 col2 col3 col4 -------------------------- 5 March King7 Alex 5 March King7 '' </code></pre> <hr> <pre><code> insert into TAB1(col1,col2,col3,col4) select distinct 5, case when Queen='yash' then 'March' else '' end, case when Queen='yash' then 'King7' else '' end, case when Queen='yash' then king else '' end From TAB2 ; -------------------------- col1 col2 col3 col4 -------------------------- 5 March King7 Alex 5 '' '' '' </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload