IITDU Forum
Would you like to react to this message? Create an account in a few clicks or log in to continue.

SQL commands taught on 7th August 2010 Class

4 posters

Go down

SQL commands taught on 7th August 2010 Class Empty SQL commands taught on 7th August 2010 Class

Post by BIT0122-Amit Sat Aug 07, 2010 11:32 pm

Well, here this goes:

Code:


select lpad(salary,10,'*') from hr.employees;

 
select round(102.926,2) from dual;

 
select trunc(45.929,2) from dual;

 
select round(127.49, -1) from dual;

 
select round(123.49, -1) from dual;

 
select trunc(126.49, -1) from dual;

 
select round(187.49, -2) from dual;

 
select round(550.49, -2) from dual;

 
select round(500.49, -2) from dual;

 
select trunc(160.49, -2) from dual;

 
select sysdate from dual

 
select last_name, (SYSDATE-hire_date)/7 as weeks

from hr.employees;

 
select sysdate from dual;

 
select to_char(sysdate,'DD-Month-RR') from dual;

 
select to_char(sysdate,'DD-Month-rr') from dual;

 
select to_char(sysdate-2, 'D Month-RR') from dual;

 
select months_between('01-oct-2010',sysdate) from dual;

 
select to_char(next_day('01-aug-10','FRIDAY'),'DD-Month-RR') from dual;

 
select last_day('01-Feb-08') from dual;

 
select to_char(Last_day('07-aug-10'),'MOnth') from dual;

 
select to_char(sysdate,'DD-Month-RRRR');

 
select sysdate from dual;

 
select to_char(round(sysdate, 'month'),'DDth-Month-RRRR') from dual;

 
select to_char(sysdate-172, 'dd-month-RRRR') from dual

 
select round(sysdate-172, 'Month') from dual

 
select round (sysdate-38,'year') from dual;

 
select round (sysdate,'year') from dual;

 
select round(to_char('14-Feb-2010', 'dd-mon-RRRR'),'month') from dual

 
select trunc(sysdate, 'year') from dual

 
select trunc(sysdate, 'month') from dual

 
select to_char(sysdate,'year') from dual;

 
select to_char(sysdate,'RRRR') from dual;

 
select to_char(sysdate,'RR') from dual;

 
 
select to_char(12345, '99999999') from dual;

 
select to_char(12345, '099999999') from dual;

 
select to_char(12345, '99.999') from dual;

 
select to_char(-12345, '99999999PR') from dual;

 
select to_char(12345, '99999999PR') from dual;



Next week, it will be your turn to post this sql commands. How? If you are using toad, simply press control + s to save the used sql commands. It will give you a text file. Open it, select all, press ctrl+c and all of them will be copied.

yeah yeah.. I am being sarcastic. But if you did know... I wonder why no one used this till now.

rock on!

paste bin version:



Last edited by BIT0122-Amit on Fri Oct 08, 2010 9:25 pm; edited 1 time in total
BIT0122-Amit
BIT0122-Amit
Founder
Founder

Course(s) :
  • BIT

Blood Group : O+
Posts : 4187
Points : 6605

https://iitdu.forumotion.com

Back to top Go down

SQL commands taught on 7th August 2010 Class Empty Re: SQL commands taught on 7th August 2010 Class

Post by BIT0129-Tabassum Sun Aug 08, 2010 1:34 am

Nice work Very Happy
BIT0129-Tabassum
BIT0129-Tabassum
Global Moderator
Global Moderator

Course(s) :
  • BIT

Blood Group : A+
Posts : 1496
Points : 2298

http://probe-tabassum.blogspot.com

Back to top Go down

SQL commands taught on 7th August 2010 Class Empty Re: SQL commands taught on 7th August 2010 Class

Post by BIT0112-Rokon Wed Aug 11, 2010 1:49 am

is it possible to elaborate all the commands..?
BIT0112-Rokon
BIT0112-Rokon
Programmer
Programmer

Course(s) :
  • BIT

Blood Group : O+
Posts : 673
Points : 1269

http://blog.codexplo.org

Back to top Go down

SQL commands taught on 7th August 2010 Class Empty Re: SQL commands taught on 7th August 2010 Class

Post by BIT0115-Efat Wed Aug 11, 2010 2:32 am

bit0112-rokon wrote:is it possible to elaborate all the commands..?

Sad Sad Sad
BIT0115-Efat
BIT0115-Efat
Service Release
Service Release

Course(s) :
  • BIT

Blood Group : O+
Posts : 779
Points : 1120

Back to top Go down

SQL commands taught on 7th August 2010 Class Empty Re: SQL commands taught on 7th August 2010 Class

Post by BIT0122-Amit Wed Aug 11, 2010 3:45 pm

It is suggested to read the Oracle SQL plus book provided by ripon sir. He is following that book. And it is quite descriptive.
BIT0122-Amit
BIT0122-Amit
Founder
Founder

Course(s) :
  • BIT

Blood Group : O+
Posts : 4187
Points : 6605

https://iitdu.forumotion.com

Back to top Go down

SQL commands taught on 7th August 2010 Class Empty Re: SQL commands taught on 7th August 2010 Class

Post by Sponsored content


Sponsored content


Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum