SQL
1.Oracle is way more powerful than MySQL
2.Oracle supports distributed databases while MySQL doesn’t
3.Oracle supports save points while MySQL doesn’t
4.Oracle allows programs within the database while MySQL doesn’t
5.Oracle is suited for enterprise deployments while MySQL is suited for small to medium scale
6.Oracle requires that you pay a licensing fee while MySQL doesn’t
Select
Insert
Update
Delete
Merge
*in DML it needs COMMIT command to save in the database, otherwise its not saved
** DR CAT
Basic form:
SELECT attributes
FROM relations
WHERE conditions
UPPER = where you write the all content such as name in capital letter
Lower= where you write the all content such as name in smaller letter
QUESTION:
GET INFORMATION OF THE EMPLOYEE ‘ALANA’
SELECT * FROM EMPLOYEES
WHERE
UPPER (FIRST_NAME)= 'ALANA'
lower(first_name)=‘alana’
When we need to find information
QUE: give all employees first_name with p
Select * from employees
Where
UPPER (first_name) like ‘P%’
1. MAX
2. AVG
3. MIN
4. COUNT
5. SUM
To save your work from sql to doc file
Write spool c:\nameofthedocument.doc beginning of your query
Write your query
Select * from employees
And spool off (end of your query)
SQL Joins