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 next 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

Re: Want to know insert into [message #678408 is a reply to message #678407] Sat, 30 November 2019 20:01 Go to previous messageGo to next message
EdStevens
Messages: 1376
Registered: September 2013
Senior Member
This looks like a follow-on to one of your previous threads.

I dare say that nothing you learned about databases from Access will apply to Oracle. Most heavyweight DBA's don't even consider Access to be a real rdbms, but just a toy.

If you want to know how to insert rows into an oracle database, you should start with the SQL Reference, particularly the section on the INSERT statement. It is quite normal to INSERT without a CREATE TABLE statement.
Re: Want to know insert into [message #678410 is a reply to message #678407] Sun, 01 December 2019 00:48 Go to previous messageGo to next message
Michel Cadot
Messages: 68624
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

From your previous topic:

Michel Cadot wrote on Thu, 28 November 2019 07:14

From your previous topic:

Michel Cadot wrote on Wed, 27 November 2019 19:15

Welcome to the forum.
Please read the OraFAQ Forum Guide and How to use [code] tags and make your code easier to read.
Also always post your Oracle version, with 4 decimals, as solution depends on it.
...
And feedback if you want to continue to get help.
Re: Want to know insert into [message #678421 is a reply to message #678408] Sun, 01 December 2019 20:13 Go to previous message
kabina
Messages: 8
Registered: November 2019
Junior Member
EdStevens wrote on Sat, 30 November 2019 20:01
This looks like a follow-on to one of your previous threads.

I dare say that nothing you learned about databases from Access will apply to Oracle. Most heavyweight DBA's don't even consider Access to be a real rdbms, but just a toy.

If you want to know how to insert rows into an oracle database, you should start with the SQL Reference, particularly the section on the INSERT statement. It is quite normal to INSERT without a CREATE TABLE statement.
Thank you very much.
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 Mar 28 07:13:29 CDT 2024