Save
Upgrade to remove ads
Busy. Please wait.
Log in with Clever
or

show password
Forgot Password?

Don't have an account?  Sign up 
Sign up using Clever
or

Username is available taken
show password


Make sure to remember your password. If you forget it there is no way for StudyStack to send you a reset link. You would need to create a new account.
Your email address is only used to allow you to reset your password. See our Privacy Policy and Terms of Service.


Already a StudyStack user? Log In

Reset Password
Enter the associated with your account, and we'll email you a link to reset your password.
focusNode
Didn't know it?
click below
 
Knew it?
click below
Don't Know
Remaining cards (0)
Know
0:00
Embed Code - If you would like this activity on your web page, copy the script below and paste it into your web page.

  Normal Size     Small Size show me how

SQL

QuestionAnswer
Display the dept information from department table. select * from dept;
Display the details of all employees. select * from emp;
Display the name and job for all employees. select ename, job from emp;
Display name and salary for all employees. select ename, sal from emp;
Display employee number and total salary for each employee. select empno, sal+comm from emp;
Display employee name and annual salary for all employees. select empno, empname, 12*sal+nvl(comm,0) annualsal from emp;
Display the names of all employees who are working in department number 10. select ename from emp where deptno=10;
Display the names of all employees working as clerks and drawing a salary more than 3000. select ename from emp where job=?CLERK? and sal>3000;
Display employee number and names for employees who earn commission. select empno, ename from emp where comm is not null and comm>0;
Display names of employees who do not earn any commission. Select empno, ename from emp where comm is null and comm=0;
Display the names of employees who are working as clerk, salesman or analyst and drawing a salary more than 3000. select ename from emp where (job=?CLERK? or job=?SALESMAN? or job=?ANALYST?) and sal>3000; (or) select ename from emp where job in(?CLERK?,?SALESMAN?,?ANALYST?) and sal>3000;
Display the names of employees who are working in the company for the past 5 years. select ename from emp where sysdate-hiredate>5*365;
Display the list of employees who have joined the company before 30th June 90 or after 31st dec 90. select * from emp where hiredate between ?30-jun-1990? and ?31-dec-1990?;
Display current date. select sysdate from dual;
Display the list of users in your database (using log table). select * from dba_users;
Display the names of all tables from the current user. select * from tab;
Display the name of the current user. show user;
Display the names of employees working in department number 10 or 20 or 40 or employees working as clerks, salesman or analyst. select ename from emp where deptno in (10,20,40) or job in (?CLERK?,?SALESMAN?,?ANALYST?);
Display the names of employees whose name starts with alphabet S select ename from emp where ename like ?S%?;
Display employee names for employees whose name ends with alphabet. select ename from emp where ename like ?%S?;
Created by: abcz123
 

 



Voices

Use these flashcards to help memorize information. Look at the large card and try to recall what is on the other side. Then click the card to flip it. If you knew the answer, click the green Know box. Otherwise, click the red Don't know box.

When you've placed seven or more cards in the Don't know box, click "retry" to try those cards again.

If you've accidentally put the card in the wrong box, just click on the card to take it out of the box.

You can also use your keyboard to move the cards as follows:

If you are logged in to your account, this website will remember which cards you know and don't know so that they are in the same box the next time you log in.

When you need a break, try one of the other activities listed below the flashcards like Matching, Snowman, or Hungry Bug. Although it may feel like you're playing a game, your brain is still making more connections with the information to help you out.

To see how well you know the information, try the Quiz or Test activity.

Pass complete!
"Know" box contains:
Time elapsed:
Retries:
restart all cards