Answers for "for sql"

SQL
0

sql for loop

/*
For loop in sql
*/
Example:
DECLARE 
   a number(2); 
BEGIN 
   FOR a in 10 .. 20 LOOP 
      dbms_output.put_line('value of a: ' || a); 
  END LOOP; 
END; 
/


Output:
value of a: 10 
value of a: 11 
value of a: 12 
value of a: 13 
value of a: 14 
value of a: 15 
value of a: 16 
value of a: 17 
value of a: 18 
value of a: 19 
value of a: 20
Posted by: Guest on May-07-2020
0

into sql

#The SELECT INTO statement selects data from one table and inserts it into a different table. 
#The SELECT INTO statement is most often used to create backup copies of tables. 
syntax->SELECT *
INTO new_table_name [IN externaldatabase]
FROM old_tablename 
///example///
SELECT *
INTO Persons_Backup
FROM Persons
Posted by: Guest on January-25-2021

Code answers related to "SQL"

Browse Popular Code Answers by Language