Home » SQL & PL/SQL » SQL & PL/SQL » Want to know insert into
Want to know insert into [message #678407] Sat, 30 November 2019 17:37 Go to previous message
kabina
Messages: 8
Registered: November 2019
Junior Member
What I believe insert command just like append command in MS access. In access you need to create table stricture then you use append command to insert data as your need.

I got access back-end tables of oracle but have no permission to create table or temp table structure. I have following question in mind if you could solve. if we cannot create table or table structure then if we want to insert some data how can we do that ?
Let say


select t.empid, t.empname, t.dept, sum(t.sal)
from
(Select empid, empname, dept, sal from tblemployee) t
group by t.empid, t.empname, t.dept;




I have another query which added new 5 UKemployee


Select empid, empname, dept and sal from UKemplayee


I want to insert these 5 uk employees detail in my first query.

one possible solution is that

select t.empid, t.empname, t.dept, sum(t.sal)
from
(Select empid, empname, dept, sal from tblemployee) t
group by t.empid, t.empname, t.dept;
union all
Select empid, empname, dept and sal from UKemplayee


it looks stupid but I want to clear my mind if I am unable to create table, if you want to insert few more lines in my final result. what is the best solution for that.

can we you use insert into command in sql query with making table structure ?

Thanks in advance.

[Updated on: Sat, 30 November 2019 17:38]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Finding Date Pattern using LEAD
Next Topic: Run Oracle SQL query multiple times with change in filter condition
Goto Forum:
  


Current Time: Thu Apr 25 15:48:54 CDT 2024