This is the last quiz for 2013 and before I take a break ("vacation"). When looking at the English language version of the DB2 10.5 Information Center, what do these four (4) pages have in common?
Where condition in SQL warehousing transform operator:
http://pic.dhe.ibm.com/infocenter/db2luw/v10r5/topic/com.ibm.dwe.sqw.doc/designing/data_flow/ropwhere.html
SEND procedure - Send E-Mail to an SMTP server:
http://pic.dhe.ibm.com/infocenter/db2luw/v10r5/topic/com.ibm.db2.luw.apdv.sqlpl.doc/doc/r0055177.html
UTL_SMTP module:
http://pic.dhe.ibm.com/infocenter/db2luw/v10r5/topic/com.ibm.db2.luw.apdv.sqlpl.doc/doc/r0055180.html
The SAMPLE database:
http://pic.dhe.ibm.com/infocenter/db2luw/v10r5/topic/com.ibm.db2.luw.apdv.samptop.doc/doc/r0001094.html
Any guesses? It is about the samples and the current season...
Enjoy the holidays and all the best for 2014!
Henrik's thoughts on life in IT, data and information management, cloud computing, cognitive computing, covering IBM Db2, IBM Cloud, Watson, Amazon Web Services, Microsoft Azure and more.
Thursday, December 12, 2013
Wednesday, December 4, 2013
DB2: Nothing to hide...
Today, while teaching a DB2 class, I was asked whether it is possible to hide all columns of a table. The rationale behind the question was that then all application developers would be forced to specify the columns during INSERT. Well, my first reaction was that at least one column needs to be visible. How does it look like?
Testing is faster than looking into the manual for IMPLICITLY HIDDEN columns, so here is a quick test:
db2 => create table hideme(id int implicitly hidden, s varchar(60) implicitly hidden)
DB21034E The command was processed as an SQL statement because it was not a
valid Command Line Processor command. During SQL processing it returned:
SQL20422N The statement failed because the table "HLOESER.HIDEME" would only
contain hidden columns. SQLSTATE=428GU
db2 => create table hideme(id int, s varchar(60) implicitly hidden)
DB20000I The SQL command completed successfully.
db2 => insert into hideme values(1)
DB20000I The SQL command completed successfully.
db2 => insert into hideme(id,s) values(2,'Hey')
DB20000I The SQL command completed successfully.
db2 => select * from hideme
ID
-----------
1
2
2 record(s) selected.
db2 => select id,s from hideme
ID S
----------- ------------------------------------------------------------
1 -
2 Hey
2 record(s) selected.
At least one column must be visible as assumed.
Testing is faster than looking into the manual for IMPLICITLY HIDDEN columns, so here is a quick test:
db2 => create table hideme(id int implicitly hidden, s varchar(60) implicitly hidden)
DB21034E The command was processed as an SQL statement because it was not a
valid Command Line Processor command. During SQL processing it returned:
SQL20422N The statement failed because the table "HLOESER.HIDEME" would only
contain hidden columns. SQLSTATE=428GU
db2 => create table hideme(id int, s varchar(60) implicitly hidden)
DB20000I The SQL command completed successfully.
db2 => insert into hideme values(1)
DB20000I The SQL command completed successfully.
db2 => insert into hideme(id,s) values(2,'Hey')
DB20000I The SQL command completed successfully.
db2 => select * from hideme
ID
-----------
1
2
2 record(s) selected.
db2 => select id,s from hideme
ID S
----------- ------------------------------------------------------------
1 -
2 Hey
2 record(s) selected.
At least one column must be visible as assumed.
Subscribe to:
Posts (Atom)