16.10.2015 Views

Getting Started with IBM Data Studio for DB2

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

237<br />

Chapter 8 – Developing SQL stored<br />

procedures<br />

Stored procedures provide an efficient way to run business logic by reducing the overhead<br />

of SQL statements and result sets that are passed back and <strong>for</strong>th through the network.<br />

Among the different languages that <strong>DB2</strong> supports to write stored procedures, SQL is the<br />

language of preference because of its efficiency and simplicity. Moreover, SQL stored<br />

procedures are simpler to develop and manage.<br />

<strong>Data</strong> <strong>Studio</strong> supports stored procedure development and debugging. In this chapter, you<br />

will learn:<br />

• Why stored procedures are so popular and useful<br />

• An overview of the steps to develop and debug a stored procedure<br />

• How to create, test, and deploy a sample SQL stored procedure using <strong>Data</strong> <strong>Studio</strong><br />

• How to edit, and debug a sample SQL stored procedure using <strong>Data</strong> <strong>Studio</strong><br />

Note:<br />

<strong>DB2</strong> <strong>for</strong> Linux, UNIX and Windows supports stored procedures written in SQL (SQL PL),<br />

PL/SQL, Java, C/C++, COBOL, and CLR. However, from <strong>Data</strong> <strong>Studio</strong> you can only<br />

develop stored procedures using SQL, PL/SQL and Java. In this chapter, we focus on<br />

writing SQL procedures. Learn more by reading the following document:<br />

http://pic.dhe.ibm.com/infocenter/db2luw/v10r1/topic/com.ibm.db2.luw.apdv.sqlpl.doc/do<br />

c/c0024289.html

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!