Sha256: 841425a49ef02a0b95954937fb443adafa60fcefcf6f455895c888bad8ade9cd

Contents?: true

Size: 615 Bytes

Versions: 10

Compression:

Stored size: 615 Bytes

Contents

{{works with|Db2 LUW}}
With SQL only:
<syntaxhighlight lang="sql pl">
SELECT 'Hello world!' AS text FROM sysibm.sysdummy1;

Output:

db2 -t
db2 => SELECT 'Hello world!' AS text FROM sysibm.sysdummy1;

TEXT        
------------
Hello world!

  1 record(s) selected.


{{works with|Db2 LUW}} version 9.7 or higher.
With SQL PL:
<syntaxhighlight lang="sql pl">
SET SERVEROUTPUT ON;

CALL DBMS_OUTPUT.PUT_LINE('Hello world!');

Output:

db2 -t
db2 => SET SERVEROUTPUT ON
DB20000I  The SET SERVEROUTPUT command completed successfully.
db2 => CALL DBMS_OUTPUT.PUT_LINE('Hello world!')

  Return Status = 0

Hello world!

Version data entries

10 entries across 7 versions & 1 rubygems

Version Path
zettacode-0.1.7 files.zettacode/hello_world.text/sql_pl.txt
zettacode-0.1.6 files.zettacode/hello_world.text/sql_pl.txt
zettacode-0.1.6 files.zettacode2/hello_world.text/sql_pl.txt
zettacode-0.1.5 files.zettacode/hello_world.text/sql_pl.txt
zettacode-0.1.5 files.zettacode2/hello_world.text/sql_pl.txt
zettacode-0.1.4 files.zettacode/hello_world.text/sql_pl.txt
zettacode-0.1.4 files.zettacode2/hello_world.text/sql_pl.txt
zettacode-0.1.3 files.zettacode/hello_world.text/sql_pl.txt
zettacode-0.1.2 files.zettacode/hello_world.text/sql_pl.txt
zettacode-0.1.1 zettacode.files/hello_world.text/sql_pl.txt