Welcome -
Guest!
Login
/
Register Now
|
Search:
Home
Articles
Forum
Interview FAQ
Activities
News
Videos
Poll
Links
People
Groups
Oracle Articles
Submit Article
Home
»
Articles
»
Oracle
»
Select Query
RSS Feeds
Write a query to calculate the year difference
Posted By:
Arnelle Schmidt
Category:
Oracle
Views:
2191
Write a query to calculate the year difference.
Write a query to calculate the year difference
SELECT months_between (SYSDATE,DOB)/12 FROM PSTUDENT;
O
utput :
MONTHS_BETWEEN(SYSDATE,DOB)/12
14.113978
14.554838
13.847849
14.600537
17.18387
17.100537
13.764515
Share:
Previous Post:
Write a query to Calculate the month difference
Next Post:
Write a query to find the last day of the month
Didn't find what you were looking for? Find more on
Write a query to calculate the year difference
Or get
search suggestion and latest updates
.
Arnelle Schmidt
author of Write a query to calculate the year difference is from Frankfurt,
Germany
.
View All Articles
Related Articles and Code:
Write a query to calculate the Date difference
Write a query to Calculate the month difference
Write a query to add days in todays date using sysdate function
Write a query to subtract days from todays date
Write a query to add and subtract months using add_months function
Write a query to change the format of date using to_char function
Write a query to change the case of strings using lower and upper function
Write a query to find the last day of the month
Write a script to enhance the calander to accept any month as mm or mmm or only year as yyyy or both month and year
Program to find whether a year is a leap year or not
Prolog program to check whether a year is a leap year or not
USING EXISTS with CO-RELATED SUB-QUERIES
UNION QUERY
Example to concatenate a string using select query
Example to find employees from state 'Delhi' using select query
Display items having item price between 100 to 500 using select query
Display item details in descending order of item price using order by clause in select query
Example of sub query to display items having item price less than Keyboard
Select Query
Where clause with select query
Other Interesting Articles in Oracle:
Student - project database
Display top 3 highest item price from item table
TRANSACTIONS AND CONCURRENCY
Display 2 items having lowest current stock
FROM clause
Display customers whose name starts with 's'
CREATE USER
WHERE clause
DROP TRIGGER
Display items having item price between 100 to 500 using select query
GROUP BY Clause
Example to rename table name
Example of Create Table
Example to create sequence
Example to add a field or column in a table
Example to add constraint of primary key in a table
Display customers detail in a ascending order of customer name using order by clause in a select query
Display customers which are from satellite area of ahmedabad, nadiyad cities
MINUS OPERATOR
Write a query to add days in todays date using sysdate function
Please enter your Comment
*
*
Comment should be atleast 30 Characters.
Please put code inside [Code] your code [/Code].
Please login to post comment
No Comment Found, Be the First to post comment!
Oracle
View All
Aggregate Functions
Analytical Functions
Common Statements
Constraints
Cursor
Data Control Language
Data Definition Lang
Data Manipulation Lang
Data Type
Database
Date Time Functions
Functions
Index
Interview FAQ
Joins
Math Functions
Operators
Select Query
Sequence
Stored Procedures
String Functions
Sub Query
System Functions
Transaction Control La...
Trigger
View
Assembly Language
Artificial Intelligence
C Programming
C++ Programming
Visual C++
OOAD
Cobol
Java
SQL Server
Asp.net MVC
Rest and WCF Services
Entity Framework
Knockout.Js
Unix / Linux / Ubuntu
Networking
OOPs Concept
HTML
Dos
SQL
System Analysis & Design
Gadgets
Internet
CSS
Javascript
.Net Framework
Asp.net
C#
VB.Net
Python
Perl
Software Engineering
RDBMS Terms
AJAX Framework
Design Pattern
UML
WPF
WCF
SEO
PowerShell
Visual Studio
WWF
BizTalk Server
Azure
General
Testing
Online Certifications
PHP
My SQL
LinQ
Project Management
Silverlight
XML
MS Office
Windows OS
DHTML
Sharepoint