Professional Documents
Culture Documents
PLSQL 9 2
PLSQL 9 2
PL/SQL
9-2
Using Functions in SQL Statements
PLSQL S9L2 Copyright © 2016, Oracle and/or its affiliates. All rights reserved. 3
Using Functions in SQL Statements
Purpose
PLSQL S9L2 Copyright © 2016, Oracle and/or its affiliates. All rights reserved. 4
Using Functions in SQL Statements
What Is a User-Defined Function?
PLSQL S9L2 Copyright © 2016, Oracle and/or its affiliates. All rights reserved. 5
Using Functions in SQL Statements
Advantages of Functions in SQL Statements
PLSQL S9L2 Copyright © 2016, Oracle and/or its affiliates. All rights reserved. 6
Using Functions in SQL Statements
Advantages of Functions in SQL Statements
PLSQL S9L2 Copyright © 2016, Oracle and/or its affiliates. All rights reserved. 7
Using Functions in SQL Statements
Advantages of Functions in SQL Statements
PLSQL S9L2 Copyright © 2016, Oracle and/or its affiliates. All rights reserved. 8
Using Functions in SQL Statements
Advantages of Functions in SQL Statements
PLSQL S9L2 Copyright © 2016, Oracle and/or its affiliates. All rights reserved. 9
Using Functions in SQL Statements
Advantages of Functions in SQL Statements
PLSQL S9L2 Copyright © 2016, Oracle and/or its affiliates. All rights reserved. 10
Using Functions in SQL Statements
Function in SQL Expressions: Example
PLSQL S9L2 Copyright © 2016, Oracle and/or its affiliates. All rights reserved. 11
Using Functions in SQL Statements
Where Can You Use User-Defined
Functions in a SQL Statement?
PLSQL S9L2 Copyright © 2016, Oracle and/or its affiliates. All rights reserved. 13
Using Functions in SQL Statements
Restrictions on Using Functions in SQL
Statements
PLSQL S9L2 Copyright © 2016, Oracle and/or its affiliates. All rights reserved. 15
Using Functions in SQL Statements
Restrictions on Using Functions in SQL
Statements
PLSQL S9L2 Copyright © 2016, Oracle and/or its affiliates. All rights reserved. 16
Using Functions in SQL Statements
Restrictions on Using Functions in SQL
Statements
PLSQL S9L2 Copyright © 2016, Oracle and/or its affiliates. All rights reserved. 17
Using Functions in SQL Statements
Restrictions on Using Functions in SQL
Statements: Example 1
UPDATE employees
SET salary = dml_call_sql(2000)
WHERE employee_id = 174;
PLSQL S9L2 Copyright © 2016, Oracle and/or its affiliates. All rights reserved. 18
Using Functions in SQL Statements
Restrictions on Using Functions in SQL
Statements: Example 2
PLSQL S9L2 Copyright © 2016, Oracle and/or its affiliates. All rights reserved. 19
Using Functions in SQL Statements
Terminology
PLSQL S9L2 Copyright © 2016, Oracle and/or its affiliates. All rights reserved. 20
Using Functions in SQL Statements
Summary
PLSQL S9L2 Copyright © 2016, Oracle and/or its affiliates. All rights reserved. 21
Using Functions in SQL Statements