GeekInterview.com
Series: Subject: Topic:
Question: 28 of 190

can we insert a record in dual?

Asked by: ashish88 | Member Since Jun-2008 | Asked on: Jun 11th, 2008

View all questions by ashish88   View all answers by ashish88

Showing Answers 1 - 7 of 7 Answers

yes i can insert a record in dual
to use this command
CREATE TABLE DUAL(COL1 VARCHAR(1));
select sysdate from dual
insert into dual values('X')
commit
insert into dual values('X')

to use and show the result


 hope this Help You
Ashish Sharma

  
Login to rate this answer.
krishnaveni_g

Answered On : Jul 11th, 2008

View all answers by krishnaveni_g

Dual is a default table it contains one row, one column.  But we can create table like dual and insert records in that table

create table dual(name varchar2(20));
insert into dual values('Rushi');
commit;
Select * from dual;
It will show Rushi

select sysdate from dual;
This will show result from default dual table

Yes  2 Users have rated as useful.
  
Login to rate this answer.
spohilko

Answered On : Aug 15th, 2008

View all answers by spohilko

The answer depends on release. Before 10g it was possible, starting with 10g - no.

  
Login to rate this answer.
tripathi.atul

Answered On : Sep 9th, 2008

View all answers by tripathi.atul

Dual is a table owned by sys user and public synonym for the same is created.
So it is available to all the users of the database.

To get the details use following query :

select * from all_synonyms  a
where a.synonym_name = 'DUAL';

By using create table to create dual table we can insert into dual .

But without creating dual we cannot insert into dual.As we didn't have insert object privilege on sys.dual table or public synonym dual.

Yes  4 Users have rated as useful.
  
Login to rate this answer.
imtiazali

Answered On : Jun 5th, 2009

View all answers by imtiazali

We cannot insert, update, delete record in dual table.
Dual means dummy. In the dual table only one column is present.

  
Login to rate this answer.
Rabindra_Kumar

Answered On : Oct 28th, 2009

View all answers by Rabindra_Kumar

You can perform any DML operations in dual table provided that you have been given the privilege to do so.
However never try to perform any DML operations (delete/insert/update) in dual table because dual is basically used to work with scalar query. If you insert any record into dual table it may stop many running applications

Yes  1 User has rated as useful.
  
Login to rate this answer.
Niranjan Dubey

Answered On : Jan 6th, 2012

Dual is a Dummy table when we execute query..

Code
  1. SELECT * FROM dual it will SHOW ..     DUMMY
  2.                                                    X            

It has Public synonym named DUAL thats why it is accessible from any session in any schema and there is only SELECT privilege is granted on dual thats why DML cannt be fire on DUAL table ... by- Niranjan Dubey

  
Login to rate this answer.

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

Related Open Questions

Ads

Connect

twitter fb Linkedin GPlus RSS

Ads

Interview Question

 Ask Interview Question?

 

Latest Questions

Ads

Interview & Career Tips

Get invaluable Interview and Career Tips delivered directly to your inbox. Get your news alert set up today, Once you confirm your Email subscription, you will be able to download Job Inteview Questions Ebook . Please contact me if you there is any issue with the download.