GeekInterview.com
Answered Questions

How to delete multiple tables at a time? E.G like c* means all the tables starts with C have to be deleted at a time.

Asked By: anbu | Asked On: Oct 17th, 2007

Answered by: anand.managoli on: Nov 26th, 2010

As per my knowledge we cannot use Regular Expressions with drop stmt. You can delete multiple tables in a single statement by separating them with a comma.Ex:mysql> show tables;+--------------...

Answered by: dinu_26 on: Nov 12th, 2008

There is no way to delete multiple table at a time.
You can just drop a single table at a time.


Syntax:

table name.

Evaluate this query?Select e.Emp_id from emp@wing e; what is "@wing" ? Is it a partition on emp table or a constraint on table emp?

Asked By: Dino_Rocks | Asked On: Aug 1st, 2007

Answered by: Imran_Javed on: May 13th, 2008

Its a DB link which is used to access tables which reside on another server.
From the above query you are trying to access emp table which is in "WING" schema.
WING being on other server.

Answered by: Amritendra kumar on: Feb 28th, 2008

It is connection string

What are the different types of joins and explain in brief how to use them ?

Asked By: G.sathyanarayanan | Asked On: Apr 9th, 2007

Answered by: rajakumar_na on: Nov 16th, 2007

Hi shravanam,
Wht is this u r wrong?
Non-Euqijoin : Join more than one table with other than equlity operator (i.e. BETWEEN ... AND....)

Answered by: shravanam on: Oct 24th, 2007

Join is a query which retrieves related columns or rows from multiple tables. Self Join - Joining the table with itself. Equi Join - Joining two tables by equating two common columns. Non-Equi Join - ...

(i)a table is classfied as a parent table and you want to drop and recreat it .How would you do this without affecting the children tables?(ii)you want to group the following set of selected returns ,what...

Asked By: umarajeswari | Asked On: Jan 23rd, 2007

Answered by: shravanam on: Oct 24th, 2007

i. YOU CAN NOT DELETE A PARENT TABLE WITHOUT DELETING CHILDREN TABLES. BUT VICE VERSA CAN TAKE PLACE.II. IF YOU HAVE ITEM CATEGORY THEN U CAN HAVE GROUP BY EXPRESSION ON ITEM_CATEGORY.III. DELETE FROM...

Answered by: sunil saini on: Feb 27th, 2007

(1) use cascade option in query

What is a mutating trigger error? How can we resolve it?I need this reply asap. Thanks

Asked By: be17be | Asked On: Dec 1st, 2006

Answered by: Ashish on: Mar 24th, 2012

See, in oracle to maintain read consistency oracle keeps a copy in undo section of database for the data which is under modification by some transaction. And so readers do not wait for writers and ca...

Answered by: Kranthi on: Jul 13th, 2011

In before update/delete trigger if we use select statement for fetching the records.in this scenario will wet mutating trigger error.using row level trigger we can avoid instead of statement level trigger. we can accurate results.

Hi,can u write a function without a return statement.Please quickly send answer.Plzzzzzzzzzzzzzzz.

Asked By: Saritha | Asked On: Nov 15th, 2006

Answered by: shravanam on: Oct 24th, 2007

NO YOU CANNOT WRITE A FUNCTION WITHOUT RETURNING A VALUE.
IT SHOULD RETURN ATLEAST ONE VALUE.........


WITH REGARDS,
SHARAT

Answered by: Pawan Ahuja on: Dec 9th, 2006

No, we can not write a function witout a function

Regards

Pawan Ahuja

Dear 1 simple qustion is how I can get out put likescott's sal is 2000becoz ' is special char I can not pipe it with enameasename||'scan we use escape sequence but I know that escape seq is only 4 % and...

Asked By: tariq | Asked On: Nov 14th, 2006

Answered by: shravanam on: Oct 24th, 2007

TRY THIS

SELECT ENAME||' ' ' '||'S' FROM EMP:

Answered by: José Baptista on: Nov 18th, 2006

Hi

You just need to do this: ename||'''||'s'.

If ename := 'Scott', the output is Scott's.

Regards

Jos Baptista 

What is the SQL command for retrieving a procedure or a function from the database.

Asked By: vid | Asked On: Oct 25th, 2006

Answered by: shravanam on: Oct 24th, 2007

SELECT TEXT FROM USER_SOURCE WHERE NAME='PROCEDURE/FUNCTION/PACKAGE/PACKAGEBODY'
/

Answered by: subasini on: Nov 17th, 2006

USER_SOURCE data dictionary view describes the text source of the stored objects owned by the current user wether it is procedure or function. Its columns (except for OWNER) are the same as those in All_source data dictionary view .

Thanks

Subasini 

Rownum is used to get tha top-n values. What if I want to know the value at specific position?Ex: a table emp has two columns e_name and e_salary. How can I list the e_name of the employee who is getting...

Asked By: neerak | Asked On: Oct 12th, 2006

Answered by: ashishpandey52 on: Nov 12th, 2008

select e_name,e_salary from emp where e_salary=(select min(e_salary)  from (select e_salary from emp order by sal desc )where rownum<4; 

Answered by: myhotinterview on: Jun 3rd, 2008

I think we can also use this:

select emp_name from from where rownum=3 order by salary desc

Write down a query for inserting 'n' rows into a table, prompting for the values each time a record is inserted

Asked By: NarendraChowdary | Asked On: Jul 15th, 2006

Answered by: shravanam on: Oct 24th, 2007

SYNTAX:

INSERT INTO VALUES('&COLUMN1'(STRINGS,DATES),&COLUMN2);


EXAMPLE:

INSERT INTO EMP VALUES('&ENAME',&EMPNO);

Answered by: rajanen on: Jul 19th, 2006

SYNTAX

insert into table_name &column1,..... values (.......);

e.g:

insert into emp (emp_name,emp_id) values('&emp_name','&empid');

What is report customization? What are the triggers used ?

Asked By: megh | Asked On: Jun 10th, 2006

Answered by: shravanam on: Oct 24th, 2007

what harsha said is right.
in addition to the above reports there are 3 more triggers
1. VALIDATION TRIGGERS
2.FORMAT TRIGGERS
3.ACTION TRIGGERS

Answered by: Harsha on: Jul 14th, 2006

Report Customization means taking the orginal oracle report and modifing ( changing layout, query- by adding some more field....) according the user requirement.There are 5 types of report triggers1)B...

1. Why the performance of the table is degraded when more index is created on the table......2. Whats the main usage of synonym other than that of creating other names to objects....3. Shall we able to...

Asked By: karthe | Asked On: Apr 6th, 2006

Answered by: shravanam on: Oct 28th, 2007

1. When you create more indexes on a table , for example  table A has 10 columns and you have create 8 indexes on that table. Then whenever you r going to retrieve data from that table each row o...

Answered by: Sushma on: Jul 11th, 2007

3.If we have the null values in the column then we can not create primary key trigger on that column.

4. It is an event that raised implicitly when you update the table.

Regards,
Sushma

What is the basic difference in function and store procedure.Where we use function and where we need to use store procedure.Could you please explain me in brief.

Asked By: Vivek | Asked On: Apr 5th, 2006

Answered by: sampra on: Mar 6th, 2012

procedure wont retrun any value but it can return many values on condition. but function always returns a values

Answered by: shravanam on: Oct 28th, 2007

A procedure is used to perform a specific task. It can also return a value but its not mandatory.

But a function is used to perform some calculations and it is mandatory to return atleast one value.

Can you explain what is dual table in Oracle ?

Asked By: Sundra | Asked On: Mar 29th, 2006

Answered by: subrahmanyam pattapu on: Jul 19th, 2011

Dual is default table in oracle .it contains single row and single column.All the Character functions and number functions and date functions execution done in this Dual table.

Answered by: Waseem Mehmood on: Jun 2nd, 2011

Dual is a dummy table which has one row and one column but can't make the DML opertions.

Syntax for getting the table witout any contents

Asked By: deeptipreeti | Asked On: Mar 29th, 2006

Answered by: sampra on: Mar 6th, 2012

create table emp as select * from student where 1=2;

Answered by: Satish Kopalle on: Jun 7th, 2011

select * from faculty where rownum=0;

What is the difference between primary key and aggregate key what is the difference between varchar and varchar2?

Asked By: senthilkumar | Asked On: Feb 18th, 2006

Answered by: shravanam on: Oct 25th, 2007

In varchar u can store upto 2000 bytes
In varchar2 u can store upto 4000 bytes
In Oracle  even if u declare a variable with varchar it takes varchar2 into consideration and creates that variable with varchar2

Answered by: yuvarajan2000 on: Apr 24th, 2007

Varchar and Varchar2 is different.
Varchar and varchar2 store is 2000 char.

varchar2 size is automatically reduce. It will take on using char size based.

How do you remove a column from table

Asked By: rajesh | Asked On: Sep 14th, 2005

Answered by: shravanam on: Oct 25th, 2007

You can remove a column but first of all you should see that column doest have any values and it should not be a primary key

ALTER TABLE DROP COLUMN

Answered by: Mohammed Abdul Afroze on: Sep 27th, 2007

To drop a Column from a Table.The command is.

Sql>Alter table

drop column .

Interview Question

 Ask Interview Question?

 

Career Counselling

 Have Career Question?

 Ask Chandra

 Ask Only Career questions.

Follow us: