Skip to main content

SQL Basic Presentations or Notes


Dayananda said…
Hi sir,

I really like the way you teaching and way you intract with us.
Mithun Ashok said…
Thank you Dayananda.
Anonymous said…
Sir, could you please make us aware of as why do we learn SQL in testing ??
Mithun Ashok said…
Hi Anonymous,

You learn SQL for SQL Testing.

Anonymous said…
mithun ashok
a good looking teacher arrived in our midst 1 day
the sleeping class suddenly came alive
his teaching was remarkable
your teaching has impressed every body's heart

your teaching is like burning flame is scattering fiery sparks

thank you mithun ashok
Mithun Ashok said…
WOW... AWESOME.... THANK YOU Anonymous.
Brijesh Kamath said…
Hello Mithun,

In SQL * Plus, the default user name
and password are "scott" and tiger" right? What's the default "Host String"? I and my friend had tried to use SQL * Plus in one of the systems at Qspiders today but we couldn't as we didn't know the host string. And neither did the guest faculty ! :)

Mithun Ashok said…
Hi Brijesh,

You dont need to use a Host string, let me know the error that you see. If it still does not work then please show me the system today.

prathima said…
hi sir,
can you post any articals related to correlated queries that contains theoritical explanation........its confusing between subqueries and correlated queries.......please help me out...
vicky.nedumaran said…
I registered myself in oracle online tools. And I work on it., it's very easy and simple.. Thank you sir., for your information........
shulus sinha said…
This comment has been removed by the author.
shulus sinha said…
Hello sir,
i have successfully installed d oracle 10g but wen i m starting d progarm in sql plus blank window is coming n dat login popup is also coming but after entering all pas n username it dissappears.
Mithun Ashok said…
Hi Prathima,

Sure will try to write an article on subqueries and co-related subqueries.

Mithun Ashok said…
You're welcome Vicky. :-)
Mithun Ashok said…
Hi Shulus,

If this is Windows 7, then right click on SQL*Plus and choose "Run as Administrator".

Now try to login and your SQL window will not close.

rekha said…
sir please tell me how to switch the user from system to scott in sql*plus
Jagadish S said…
hi sir,
please tel how to create an online database account once again in morn batch..
Sowmya Raghu said…
Hi Sir,

Sir, please excuse me, I'm damn sure I will not be able to completely do the subqueries assignment given by u today, because I should complete my module coding scheduled before my deadline,else you know the consequences @ work :-) , I will make sure I will do my assignment definitely very soon ...
We n my friends will miss your awesome teaching for sure after sunday...
Sowmya Raghu said…
Hi Sir,

Sir, please excuse me, I'm damn sure I will not be able to completely do the subqueries assignment given by u today, because I should complete my module coding scheduled before my deadline,else you know the consequences @ work :-) , I will make sure I will do my assignment definitely very soon ...
Me n my friends will miss your awesome teaching for sure after sunday...
Deeparv28 said…
Hello Sir
Deepa R V said…
Hello sir,
I am thankful to say u I learnt so many new things from you.
The way u teach is so impressive and make me to explore SQL in depth.
Really we are missing Your superb teaching sir!!!
Anonymous said…

Rather than people insisting go and check your site and press "like" button if you concentrate on teaching in classroom itself would be more helpful for student.
The TALL Guy said…
The TALL Guy writes.....
SQL made easy by MA. Slow please. Assignments and ur stories are good :). Total SQL dictionary=M.A.

The TALL Guy :D
Mithun Ashok said…
Thank you Deepa.
Mithun Ashok said…
Different people have different views, that doesnt mean that your view is right. Rather than concentrating on trivial issues if you concentrate on learning SQL and finding a job, you would be helping yourself not anyone. All the best.
Mithun Ashok said…
Thank you Tall Guy.
Mithun Ashok said…
Anonymous said…
you are absolutely right that different people have different opinion and view but what about when more than 45% of class have the same view. Conduct a honest "feedback" and you would get to know everything.

The TALL Guy said…
Please don't ask us to give presentations for 300 ppl :D. I will be honored to call myself "Unemployed" when u call the working guys on stage :).

Thnks again for the assignments and the Knowledge sharing :)


The TALL Guy :)
The TALL Guy said…

I was extremely nervous when you called out my name today in class :). I am still not ready for presentations :D. I dunt want to spam ur comments section so let me ask a valid question and die like an anonymous legend :)

I have windows 7 OS and have installed mysql. Please let me know the command to clear screen. I tried everywhere and couldn't find a solution for this.

Cheers and sincerely signing off

The TALL Guy :)
Darshan said…
what diff betwwen truncate and delete?
Mithun Ashok said…
Hope this was sorted out in the class....
Mithun Ashok said…
Mithun Ashok said…
One easy way to find out all mysql commands is to type help.

mysql> help

This will display most of mysql commands.

To clear the screen,

--> clear (\c) Clear command.

mysql> clear or \c
Mithun Ashok said…

Truncate: DDL statement. Truncate will delete all the rows and release the space back to DB. Does not require commit/rollback.

Delete: DML statement. Can delete all the rows or row by row. Requires commit/rollback.
Marymolfijo5 said…

i hav attended your class this year january..and i was searching for an testing job with sql data base...but nw am in to sonata software as DBA for SQL data t a good carrer path?please advise..thy asked me abt sql and gav me designation as system aanaalyssst...and the role is for sql data base.

Please help
Mithun Ashok said…
Dont worry, if you are in the role of DBA for SQL database then you are in a good role.... learn as much as you can about SQL Server database.
Pradeep D.s said…
HELLO SIR THIS IS PRADEEP.D.S(STUDENT OF QSPIDER) I WOULD LIKE TO KNOW how to access the database remotely through my webpage.
Amit Garg said…
Hello sir,
i am having trouble in creating view.
as i write this below statement.It say insufficient privileges!

SQL>Create View MyFirstView as Select ename,empno from emp;
Amit Garg said…
Hi sir,
u said Synonyms provide 'Data independence & location transparency'. How's that sir???
Anonymous said…
hello sir

how to find the numbr of working days only (leaving sat and sun)from hiredate of an employee from a particular date
Shivam said…
Sir, which workspace name is to be given while crating an account on
thrupthi a said…
sir in types of dbms in that rdbms is best and good knw then y object and mdbms came into picture??wt made them to find these two concept..??if anything is best means we wont go for further thngs knw thn how that two object dbms and multidimenstion dbms came into existence??
I visited your site today sir. There is a lot of information that is really really helpful. About group function there are some more than the ones specified in the class. Are they important Sir? Is there any way to download the slides for reference?

Thanking You
Abhinish Kumar Singh
Student of JSpiders...
This comment has been removed by the author.
pavan n said…
hi sir ,
how we make use of sql in data analysis......
Mohammad Rashid said…
Hello Sir,

There is a link "Introduction to RDBMS" on the top of this page. In this link spelling of "Introduction" is wrong. Please correct it.
Shreesh K R said…
Hi Mithun Sir,

Could you please post articles about Subqueries,Co -related, Joins. I am confused and not able to understand. If you have docs on these topics.Could you please mail me to this mail id
Hi Mithun,
Could you plz tell me how to download SQL reference book from the site... Actually I am not able to find the reference book only... plz help me......

Thank you
narayana swamy said…
mind blowing teaching sir
Anand Sharma said…
Hi sir, in oracle we have schema, one schema contains many tables. As I am using MySQL we can create new database. One data base contains many tables. Can u tell me creating new schema and creating new database in MySQL both are same.
nethra said…
hello sir, nethra here.

how to delete duplicate records? without deleting the original ex: id:1,2,3,4 ename:nethra,nethra,nethra,nethra
(assume emp table has 2 columns id & ename) i want to delete all duplicated enames and i should have only original with out hard coding how to delete??? plz reply
vivek rajmane said…
Hi Mithun,

Can please give a detailed explanation regarding MangoDB, Redis, MySQL, nodejs and angularjs.
or share me a web link or ppt which clear explains each topic.

Looking forward for your reply.

Warm regards,
your Student said…
Hi Mithun Ashok Sir.. How can we know ,how tables connected each other in database?
manjesh am said…
hellow mithun sir
i like the way u teach and make us easy to understand the sql ur lively human beings and always smiley face in u sir :) :)
manjesh am said…
This comment has been removed by the author.

Popular posts from this blog

SQL Interview Questions on Subqueries

SUB Queries:
1. List the employees working in research department 2. List employees who are located in New York and Chicago
3. Display the department name in which ANALYSTS are working
4. Display employees who are reporting to JONES
5. Display all the employees who are reporting to Jones Manager
6. Display all the managers in SALES and ACCOUNTING department
7. Display all the employee names in Research and Sales Department who are having at least 1 person reporting to them
8. Display all employees who do not have any reportees
9. List employees who are having at least 2 reporting
10. List the department names which are having more than 5 employees
11. List department name having at-least 3 salesman
12. List employees from research and accounting having at-least 2 reporting
13. Display second max salary
14. Display 4th max salary
15. Display 5th max salary  -- Answer for nth Max Salary
Co-Related Subqueries:
16. Write a query to get 4th max salary from EMP table
17. Write a query to get 2nd…

Answers for SUB Queries

1. SQL> select empno, ename from emp where deptno=(select deptno from dept where dname='RESEARCH');

2. SQL> select empno, ename from emp where deptno in (select deptno from dept where loc in ('NEW YORK','CHICAGO'));

3. SQL> select dname from dept where deptno in ( select deptno from emp where job ='ANALYST');

4. SQL> select empno, ename, mgr from emp where mgr = (select empno from emp where ename='JONES');

5. SQL> select empno, ename, mgr from emp where mgr = (select mgr from emp where ename='JONES')

6. SQL> select empno, ename, job from emp where deptno in ( select deptno from dept where dname in ('SALES','ACCOUNTING'))

7. SQL> select empno, ename, job from emp where deptno in ( select deptno from dept where dname in ('SALES','RESEARCH')) and empno in (select mgr from emp)

8. SQL> select empno, ename from emp where empno not in ( select mgr from emp where mgr is not null)

9. select…

'Linux-x86_64 Error: 28: No space left on device' While trying to start the database -- Error

SQL> startup mount pfile='/tmp/initdlfasp12.ora'
ORA-27102: out of memory
Linux-x86_64 Error: 28: No space left on device

This as you can see is on Linux x86 with 64 bit processor. We got this error after we changed SGA on 10gR2 database. So was sure that this is something to do with the OS.

Parameters to check for this are shmall.

shmall is the total amount of shared memory, in pages, that the system can use at one time.

$cat /proc/sys/kernel/shmmax

$ getconf PAGE_SIZE

As per Oracle SHMALL should be set to the total amount of physical RAM divided by page size.

Our system has 64GB memory, so change kernel.shmall = 1024 * 1024 * 1024 * 64 / 4096 = 16777216

Once this value is calculated you can modify Linux system configuration file directly.

$ su - root
vi /etc/sysctl.conf file:


# sysctl -p

Once this is done the database was started without any problem.