This document provides examples of using SQL commands in DB2 to create and manage database tables, insert and query data, create views, and more. It shows how to start and connect to a DB2 database instance named "sample", create tables like "EMPLOYEE" and insert sample records, perform joins, unions and other queries, update and delete records, create a view, list tables, and shut down the DB2 instance. The examples demonstrate basic and some advanced SQL features in DB2.
Dear Student,
Greetings from Etraining.guru.
We provide THE BEST DB2 LUW/UDB DBA training in the Industry by THE real time expert. Our Trainer comes with 10+ years of IT working experience on open systems of project team sizes ranging from 2 to 70+.
Course Highlights:
****************
(1) 32+ hours of course content:
http://www.etraining.guru/online-training-db2-luw-udb-dba.aspx
(2) 5 free classes on Unix & Shell scripting of topics of student's interest
(3) 10 hours of Free job support. Beyond these hours, job support is provided for a nominal charge of $10/hour
(4) Course fees: $400 for working professionals; $300 for students/job seekers
(5) Class Timing: Flexible, depending upon student's requirement
(6) Email: info@etraining.guru
Please feel free to let us know if any further details needed.
Thanks,
Bhavana
www.etraining.guru
Email:info@etraining.guru
"Dear Students,
Greetings from www.etraining.guru
We provide BEST online training for IBM DB2 LUW/UDB DBA by a database architect. Our DB2 Trainer comes with a working experience of 11+ years, 9+ years in DB2 and a DB2 certified professional.
DB2 LUW DBA Course Content: http://www.etraining.guru/course/dba/online-training-db2-luw-udb-dba
Course Cost: USD 350 (or) INR 21000
Number of Hours: 30-35 hours
Regards,
Karthik
www.etraining.guru
This presentation covers the basic DB2 objects description. Covers the basic administration using IBM utilities. Their complete phase wise operation and termination recoveries. Also have talked about the most frequently used DB2 catalog tables, what's the need for them in DB2. And finally have shown some SPUFI panels and their usage.
"Dear Students,
Greetings from www.etraining.guru
We provide BEST online training for IBM DB2 LUW/UDB DBA by a database architect. Our DB2 Trainer comes with a working experience of 11+ years, 9+ years in DB2 and a DB2 certified professional.
DB2 LUW DBA Course Content: http://www.etraining.guru/course/dba/online-training-db2-luw-udb-dba
Course Cost: USD 350 (or) INR 21000
Number of Hours: 30-35 hours
Regards,
Karthik
www.etraining.guru"
This PPT File, helps with the Basic Interview Questions specially for DataBase Domain.. For more questions , please log in to www.rekruitin.com
By ReKruiTIn.com
Dear Student,
Greetings from Etraining.guru.
We provide THE BEST DB2 LUW/UDB DBA training in the Industry by THE real time expert. Our Trainer comes with 10+ years of IT working experience on open systems of project team sizes ranging from 2 to 70+.
Course Highlights:
****************
(1) 32+ hours of course content:
http://www.etraining.guru/online-training-db2-luw-udb-dba.aspx
(2) 5 free classes on Unix & Shell scripting of topics of student's interest
(3) 10 hours of Free job support. Beyond these hours, job support is provided for a nominal charge of $10/hour
(4) Course fees: $400 for working professionals; $300 for students/job seekers
(5) Class Timing: Flexible, depending upon student's requirement
(6) Email: info@etraining.guru
Please feel free to let us know if any further details needed.
Thanks,
Bhavana
www.etraining.guru
Email:info@etraining.guru
"Dear Students,
Greetings from www.etraining.guru
We provide BEST online training for IBM DB2 LUW/UDB DBA by a database architect. Our DB2 Trainer comes with a working experience of 11+ years, 9+ years in DB2 and a DB2 certified professional.
DB2 LUW DBA Course Content: http://www.etraining.guru/course/dba/online-training-db2-luw-udb-dba
Course Cost: USD 350 (or) INR 21000
Number of Hours: 30-35 hours
Regards,
Karthik
www.etraining.guru
This presentation covers the basic DB2 objects description. Covers the basic administration using IBM utilities. Their complete phase wise operation and termination recoveries. Also have talked about the most frequently used DB2 catalog tables, what's the need for them in DB2. And finally have shown some SPUFI panels and their usage.
"Dear Students,
Greetings from www.etraining.guru
We provide BEST online training for IBM DB2 LUW/UDB DBA by a database architect. Our DB2 Trainer comes with a working experience of 11+ years, 9+ years in DB2 and a DB2 certified professional.
DB2 LUW DBA Course Content: http://www.etraining.guru/course/dba/online-training-db2-luw-udb-dba
Course Cost: USD 350 (or) INR 21000
Number of Hours: 30-35 hours
Regards,
Karthik
www.etraining.guru"
This PPT File, helps with the Basic Interview Questions specially for DataBase Domain.. For more questions , please log in to www.rekruitin.com
By ReKruiTIn.com
Contains information about the DB2 DSNZPARM that forms the DB2 configuration parameters. All about the different types of zPARMs. A way to update them dynamically.
Best practices for DB2 for z/OS log based recoveryFlorence Dubois
The need to perform a DB2 log-based recovery of multiple objects is a very rare event, but statistically, it is more frequent than a true disaster recovery event (flood, fire, etc). Taking regular backups is necessary but far from sufficient for anything beyond minor application recovery. If not prepared, practiced and optimised, it can lead to extended application service downtimes – possibly many hours to several days. This presentation will provide many hints and tips on how to plan, design intelligently, stress test and optimise DB2 log-based recovery.
This slide contains all the basic concepts of ISPF. It's giving the simple and easy step to get the knowledge of Interactive system productivity facility. If u like it then give me feedback on email anilbharti85@gmail.com Thanks v much.
A K Bharti
CICS error and exception handling-recovery and restart-session 6Srinimf-Slides
CICS is the power of mainframe. It has all the capabilities to handle online transactions. The ppt covers highly useful CICS concepts to refresh your CICS knowledge quickly.
Contains information about the DB2 DSNZPARM that forms the DB2 configuration parameters. All about the different types of zPARMs. A way to update them dynamically.
Best practices for DB2 for z/OS log based recoveryFlorence Dubois
The need to perform a DB2 log-based recovery of multiple objects is a very rare event, but statistically, it is more frequent than a true disaster recovery event (flood, fire, etc). Taking regular backups is necessary but far from sufficient for anything beyond minor application recovery. If not prepared, practiced and optimised, it can lead to extended application service downtimes – possibly many hours to several days. This presentation will provide many hints and tips on how to plan, design intelligently, stress test and optimise DB2 log-based recovery.
This slide contains all the basic concepts of ISPF. It's giving the simple and easy step to get the knowledge of Interactive system productivity facility. If u like it then give me feedback on email anilbharti85@gmail.com Thanks v much.
A K Bharti
CICS error and exception handling-recovery and restart-session 6Srinimf-Slides
CICS is the power of mainframe. It has all the capabilities to handle online transactions. The ppt covers highly useful CICS concepts to refresh your CICS knowledge quickly.
How to create a pluggable database by cloning an existing local pdbMarco Vigelini
How to create a pluggable database by cloning an existing local pdb
http://dbaworkshop.blogspot.com/2013/07/How-to-create-a-pluggable-database-by-cloning-an-existing-local-PDB.html
Slides from the ITOUG events in Rome and Milan 2020.
Most people think of the Flashback features in Oracle as the "In Case of Emergency" switch, to only be used when some catastrophe has occurred on your database. And while it is true that Flashback will definitely help you 3 seconds after you press the Commit button and you realise that you probably needed to have a WHERE clause on that "delete all rows from the SALES table" SQL statement. Or for when you run "drop table" on the Production database, when you were just so sure that you were logged onto the Test system. But Flashback is not only for those "Oh No!" moments. It enables benefits for developers ranging from data consistency to continuous integration and data auditing. Tucked away in Enterprise Edition are six independent and powerful technologies that might just save your career—they will also open up a myriad of other benefits of well.
Distributed Queries in IDS: New features.Keshav Murthy
Learn about the latest function relating to distributed queries that was delivered in IBM Informix® Dynamic Server (IDS) 11 and 11.5. This talk will provide an overview of distributed queries, then will jump into a deep dive on the latest functions and how you can benefit from implementing distributed queries in your solutions.
Percona xtra db cluster(pxc) non blocking operations, what you need to know t...Marco Tusa
Performing simple DDL operations as ADD/DROP INDEX in a tightly connected cluster as PXC, can become a nightmare. Metalock will prevent Data modifications for long period of time and to bypass this, we need to become creative, like using Rolling schema upgrade or Percona online-schema-change. With NBO, we will be able to avoid such craziness at least for a simple operation like adding an index. In this brief talk I will illustrate what you should do to see the negative effect of NON using NBO, as well what you should do to use it correctly and what to expect out of it.
Python questions in pdf for data science interviews. A question bank on python for practice. In Reddit and Sanfoundry, you will get random questions, but here these are in order. The difficult to answer questions explained clearly.
CICS is the power of mainframe. It has all the capabilities to handle online transactions. The ppt covers highly useful CICS concepts to refresh your CICS knowledge quickly. Nicely covered on how to view the abends in CICS.
Cics program, interval and task control commands-session 5Srinimf-Slides
CICS is the power of mainframe. It has all the capabilities to handle online transactions. The ppt covers highly useful CICS concepts to refresh your CICS knowledge quickly.
CICS is the power of mainframe. It has all the capabilities to handle online transactions. The ppt covers highly useful CICS concepts to refresh your CICS knowledge quickly. Well explained about data access in CICS.
CICS is the power of mainframe. It has all the capabilities to handle online transactions. The ppt covers highly useful CICS concepts to refresh your CICS knowledge quickly.
CICS is the power of mainframe. It has all the capabilities to handle online transactions. The ppt covers highly useful CICS concepts to refresh your CICS knowledge quickly.
CICS is the power of mainframe. It has all the capabilities to handle online transactions. The ppt covers highly useful CICS concepts to refresh your CICS knowledge quickly.
How To Master PACBASE For Mainframe In Only Seven DaysSrinimf-Slides
IBM VisualAge Pacbase is a code-switching structured programming language that is developed and maintained by IBM. VisualAge Pacbase runs on both IBM and non-IBM mainframes and integrates with IBM WebSphere Studio Application Developer. When compiling Pacbase code it is first translated into COBOL and then compiled to binary.
Easytrieve plus is an information retrieval and data management system. It is a primitive form of 4GL whose English like language and simple syntax provide the tools for easy data retrieval and report generation, Easytrieve Plus can now produce reports in HTML format. This feature allows you to create reports that can be viewed either from a local disk or LAN or from a World Wide Web server using the Web browser.
A command macro is a text file that contains one or more commands and/or command macro statements and that has a name ending with the suffix .cm. You invoke a macro by entering its name. The operating system then sequentially executes the commands and macro statements in the file.
A command macro is useful to replace one of the following:
a long command string that you issue frequently
a group of internal commands, command macros, and/or program modules that together perform an operation you regularly require
a sequence of internal commands, command macros, and/or program modules that you execute in a certain way depending on external factors
PLI Presentation for Mainframe Programmers. PL/I is one of the prominent language being used in Mainframe after COBOL. Still PLI being used in many banking and financial projects.
Unit 8 - Information and Communication Technology (Paper I).pdfThiyagu K
This slides describes the basic concepts of ICT, basics of Email, Emerging Technology and Digital Initiatives in Education. This presentations aligns with the UGC Paper I syllabus.
Read| The latest issue of The Challenger is here! We are thrilled to announce that our school paper has qualified for the NATIONAL SCHOOLS PRESS CONFERENCE (NSPC) 2024. Thank you for your unwavering support and trust. Dive into the stories that made us stand out!
We all have good and bad thoughts from time to time and situation to situation. We are bombarded daily with spiraling thoughts(both negative and positive) creating all-consuming feel , making us difficult to manage with associated suffering. Good thoughts are like our Mob Signal (Positive thought) amidst noise(negative thought) in the atmosphere. Negative thoughts like noise outweigh positive thoughts. These thoughts often create unwanted confusion, trouble, stress and frustration in our mind as well as chaos in our physical world. Negative thoughts are also known as “distorted thinking”.
The French Revolution, which began in 1789, was a period of radical social and political upheaval in France. It marked the decline of absolute monarchies, the rise of secular and democratic republics, and the eventual rise of Napoleon Bonaparte. This revolutionary period is crucial in understanding the transition from feudalism to modernity in Europe.
For more information, visit-www.vavaclasses.com
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptxEduSkills OECD
Andreas Schleicher presents at the OECD webinar ‘Digital devices in schools: detrimental distraction or secret to success?’ on 27 May 2024. The presentation was based on findings from PISA 2022 results and the webinar helped launch the PISA in Focus ‘Managing screen time: How to protect and equip students against distraction’ https://www.oecd-ilibrary.org/education/managing-screen-time_7c225af4-en and the OECD Education Policy Perspective ‘Students, digital devices and success’ can be found here - https://oe.cd/il/5yV
The Indian economy is classified into different sectors to simplify the analysis and understanding of economic activities. For Class 10, it's essential to grasp the sectors of the Indian economy, understand their characteristics, and recognize their importance. This guide will provide detailed notes on the Sectors of the Indian Economy Class 10, using specific long-tail keywords to enhance comprehension.
For more information, visit-www.vavaclasses.com
How to Make a Field invisible in Odoo 17Celine George
It is possible to hide or invisible some fields in odoo. Commonly using “invisible” attribute in the field definition to invisible the fields. This slide will show how to make a field invisible in odoo 17.
The Roman Empire A Historical Colossus.pdfkaushalkr1407
The Roman Empire, a vast and enduring power, stands as one of history's most remarkable civilizations, leaving an indelible imprint on the world. It emerged from the Roman Republic, transitioning into an imperial powerhouse under the leadership of Augustus Caesar in 27 BCE. This transformation marked the beginning of an era defined by unprecedented territorial expansion, architectural marvels, and profound cultural influence.
The empire's roots lie in the city of Rome, founded, according to legend, by Romulus in 753 BCE. Over centuries, Rome evolved from a small settlement to a formidable republic, characterized by a complex political system with elected officials and checks on power. However, internal strife, class conflicts, and military ambitions paved the way for the end of the Republic. Julius Caesar’s dictatorship and subsequent assassination in 44 BCE created a power vacuum, leading to a civil war. Octavian, later Augustus, emerged victorious, heralding the Roman Empire’s birth.
Under Augustus, the empire experienced the Pax Romana, a 200-year period of relative peace and stability. Augustus reformed the military, established efficient administrative systems, and initiated grand construction projects. The empire's borders expanded, encompassing territories from Britain to Egypt and from Spain to the Euphrates. Roman legions, renowned for their discipline and engineering prowess, secured and maintained these vast territories, building roads, fortifications, and cities that facilitated control and integration.
The Roman Empire’s society was hierarchical, with a rigid class system. At the top were the patricians, wealthy elites who held significant political power. Below them were the plebeians, free citizens with limited political influence, and the vast numbers of slaves who formed the backbone of the economy. The family unit was central, governed by the paterfamilias, the male head who held absolute authority.
Culturally, the Romans were eclectic, absorbing and adapting elements from the civilizations they encountered, particularly the Greeks. Roman art, literature, and philosophy reflected this synthesis, creating a rich cultural tapestry. Latin, the Roman language, became the lingua franca of the Western world, influencing numerous modern languages.
Roman architecture and engineering achievements were monumental. They perfected the arch, vault, and dome, constructing enduring structures like the Colosseum, Pantheon, and aqueducts. These engineering marvels not only showcased Roman ingenuity but also served practical purposes, from public entertainment to water supply.
Operation “Blue Star” is the only event in the history of Independent India where the state went into war with its own people. Even after about 40 years it is not clear if it was culmination of states anger over people of the region, a political game of power or start of dictatorial chapter in the democratic setup.
The people of Punjab felt alienated from main stream due to denial of their just demands during a long democratic struggle since independence. As it happen all over the word, it led to militant struggle with great loss of lives of military, police and civilian personnel. Killing of Indira Gandhi and massacre of innocent Sikhs in Delhi and other India cities was also associated with this movement.
2024.06.01 Introducing a competency framework for languag learning materials ...Sandy Millin
http://sandymillin.wordpress.com/iateflwebinar2024
Published classroom materials form the basis of syllabuses, drive teacher professional development, and have a potentially huge influence on learners, teachers and education systems. All teachers also create their own materials, whether a few sentences on a blackboard, a highly-structured fully-realised online course, or anything in between. Despite this, the knowledge and skills needed to create effective language learning materials are rarely part of teacher training, and are mostly learnt by trial and error.
Knowledge and skills frameworks, generally called competency frameworks, for ELT teachers, trainers and managers have existed for a few years now. However, until I created one for my MA dissertation, there wasn’t one drawing together what we need to know and do to be able to effectively produce language learning materials.
This webinar will introduce you to my framework, highlighting the key competencies I identified from my research. It will also show how anybody involved in language teaching (any language, not just English!), teacher training, managing schools or developing language learning materials can benefit from using the framework.
3. db2 => connect to sample
db2 => bind sample.bnd
Help command:
Db2 => ?
Db2 => ? CATALOG DATABASE - It gives more
info on particular command
Quit Commnad:
Db2 => quit
4. db2 => db2start This takes some time (maybe 30 seconds)
DB20000I The DB2START command completed successfully.
db2 => ?
ACTIVATE DATABASE GET CONTACTGROUPS RECONCILE
ADD CONTACT GET CONTACTS RECOVER
ADD CONTACTGROUP GET/UPDATE DB CFG REDISTRIBUTE DB PARTITION
ADD DATALINKS MANAGER GET/UPDATE DBM CFG REFRESH LDAP
ADD DBPARTITIONNUM GET DBM MONITOR SWITCHES REGISTER LDAP
ADD XMLSCHEMA GET DESCRIPTION FOR HEALTH REGISTER XMLSCHEMA
ARCHIVE LOG GET NOTIFICATION LIST REGISTER XSROBJECT
ATTACH GET HEALTH SNAPSHOT REORG INDEXES/TABLE
AUTOCONFIGURE GET INSTANCE REORGCHK
BACKUP DATABASE GET MONITOR SWITCHES RESET ADMIN CFG
BIND GET RECOMMENDATIONS RESET ALERT CFG
CATALOG APPC NODE GET ROUTINE RESET DB CFG
CATALOG APPN NODE GET SNAPSHOT RESET DBM CFG
CATALOG DATABASE HELP RESET MONITOR
CATALOG DCS DATABASE HISTORY RESTART DATABASE
CATALOG LDAP DATABASE IMPORT RESTORE DATABASE
CATALOG LDAP NODE INITIALIZE TAPE REWIND TAPE
CATALOG LOCAL NODE INSPECT ROLLFORWARD DATABASE
CATALOG NPIPE NODE LIST ACTIVE DATABASES RUNCMD
CATALOG NETBIOS NODE LIST APPLICATIONS RUNSTATS
CATALOG ODBC DATA SOURCE LIST COMMAND OPTIONS SET CLIENT
CATALOG TCPIP NODE LIST DATABASE DIRECTORY SET RUNTIME DEGREE
CHANGE DATABASE COMMENT LIST DB PARTITION GROUPS SET TABLESPACE CONTAINERS
CHANGE ISOLATION LEVEL LIST DATALINKS MANAGERS SET TAPE POSITION
COMPLETE XMLSCHEMA LIST DBPARTITIONNUMS SET UTIL_IMPACT_PRIORITY
CREATE DATABASE LIST DCS APPLICATIONS SET WRITE
5. CREATE TOOLS CATALOG LIST DCS DIRECTORY START DATABASE MANAGER
DEACTIVATE DATABASE LIST DRDA INDOUBT START HADR
DECOMPOSE XML DOCUMENT LIST HISTORY STOP DATABASE MANAGER
DECOMPOSE XML DOCUMENTS LIST INDOUBT TRANSACTIONS STOP HADR
DEREGISTER LIST NODE DIRECTORY TAKEOVER HADR
DESCRIBE LIST ODBC DATA SOURCES TERMINATE
DETACH LIST PACKAGES/TABLES UNCATALOG DATABASE
DROP CONTACT LIST TABLESPACE CONTAINERS UNCATALOG DCS DATABASE
DROP CONTACTGROUP LIST TABLESPACES UNCATALOG LDAP DATABASE
DROP DATABASE LIST UTILITIES UNCATALOG LDAP NODE
DROP DATALINKS MANAGER LOAD UNCATALOG NODE
DROP DBPARTITIONNUM LOAD QUERY UNCATALOG ODBC DATA
DROP TOOLS CATALOG MIGRATE DATABASE UNQUIESCE DATABASE
ECHO PING UNQUIESCE INSTANCE
EDIT PREP/PRECOMPILE UPDATE ALERT CFG
EXPORT PRUNE HISTORY/LOGFILE UPDATE COMMAND OPTIONS
FORCE APPLICATION PUT ROUTINE UPDATE CONTACT
GET/UPDATE ADMIN CFG QUERY CLIENT UPDATE CONTACTGROUP
GET ALERT CFG QUIESCE DATABASE UPDATE NOTIFICATION LIST
GET AUTHORIZATIONS QUIESCE INSTANCE UPDATE HISTORY
GET/UPDATE CLI CFG QUIESCE TABLESPACES UPDATE LDAP NODE
GET CONNECTION STATE QUIT UPDATE MONITOR SWITCHES
GET CONTACTGROUP REBIND XQUERY
Note: Some commands are operating system specific and may not be available.
For further help:
? db2-command - help for specified command
? OPTIONS - help for all command options
? HELP - help for reading help screens
The preceding three options can be run as db2 <option> from an OS prompt.
!db2ic - DB2 Information Center (Windows only)
This command can also be run as db2ic from an OS prompt.
6. db2 => create database slo
DB20000I The CREATE DATABASE command
completed successfully.
db2 => connect to slo
Database Connection Information
Database server = DB2/SUN64
9.7.0
SQL authorization ID = DB90 <-
my db2 account
Local database alias = SLO
8. db2 => insert into DEPARTMENT
values('SG7','Safety
Department','Springy')
DB20000I The SQL command
completed successfully.
9. db2 => select LastName, DeptName from
Employee as e, Department as d
db2 (cont.) => where e.deptno = d.deptno
LASTNAME DEPTNAME
-------------------- --------------------
Simpson Safety Department
Green Safety Department
Bing Accounting
Flanders Personnel
Geller Personnel
5 record(s) selected.
10. db2 => select Lastname, projectname
db2 (cont.) => from employee e, department d, project p
db2 (cont.) => where e.deptno = d.deptno and d.deptno =
p.deptno
LASTNAME PROJECTNAME
-------------------- --------------------
Simpson New Pay
Green New Pay
Flanders GetThings
Geller GetThings
Simpson Alpha
Green Alpha
Simpson Omega
Green Omega
Bing Delta
Simpson Pi
Green Pi
11 record(s) selected.
11. db2 => select lastname from employee as e, department as d
db2 (cont.) => where e.deptno = d.deptno and deptname = 'Safety
Department' (line wrapped by powerpoint)
LASTNAME
--------------------
Simpson
Green
2 record(s) selected.
db2 => select lastname from employee where deptno in
db2 (cont.) => (select deptno from department
db2 (cont.) => where deptname = 'Safety Department')
LASTNAME
--------------------
Simpson
Green
2 record(s) selected.
12. db2 => select * from employee, department
SSN LASTNAME FIRSTNAME SEX DEPTNO DEPTNO DEPTNAME LOCATION
--------- -------------------- ---------- --- ------ ------ -------------------- ----------
245 Simpson Homer M SG7 SG7 Safety Department Springy
245 Simpson Homer M SG7 S8P Accounting London
245 Simpson Homer M SG7 G6H Personnel London
245 Simpson Homer M SG7 K9J InfoTech Toronto
34 Flanders Ned M G6H SG7 Safety Department Springy
34 Flanders Ned M G6H S8P Accounting London
34 Flanders Ned M G6H G6H Personnel London
34 Flanders Ned M G6H K9J InfoTech Toronto
222 Green Rachel F SG7 SG7 Safety Department Springy
222 Green Rachel F SG7 S8P Accounting London
222 Green Rachel F SG7 G6H Personnel London
222 Green Rachel F SG7 K9J InfoTech Toronto
333 Bing Changler M S8P SG7 Safety Department Springy
333 Bing Changler M S8P S8P Accounting London
333 Bing Changler M S8P G6H Personnel London
333 Bing Changler M S8P K9J InfoTech Toronto
111 Geller Monica F G6H SG7 Safety Department Springy
111 Geller Monica F G6H S8P Accounting London
111 Geller Monica F G6H G6H Personnel London
111 Geller Monica F G6H K9J InfoTech Toronto
20 record(s) selected.
13. db2 => select location from department
union
db2 (cont.) => (select projectlocation
from project)
1
----------
Hong Kong
London
Springy
Toronto
4 record(s) selected.
14. db2 => create view deptlocations as
select distinct location from
department
DB20000I The SQL command completed
successfully.
db2 => select * from deptlocations
LOCATION
----------
London
Springy
Toronto
3 record(s) selected.
15. db2 => select * from projlocations except (select * from
deptlocations)
1
----------
Hong Kong
1 record(s) selected.
db2 => select * from projlocations union select * from
deptlocations
1
----------
Hong Kong
London
Springy
Toronto
4 record(s) selected.
16. db2 => select SSN as SIN from
employee
SIN
---------
111
222
245
333
34
5 record(s) selected.
17. db2 => select * from projlocations intersect
select * from deptlocations
1
----------
London
Springy
Toronto
3 record(s) selected.
18. db2 => select * from employee where firstname like
'N%'
SSN LASTNAME FIRSTNAME SEX DEPTNO
--------- -------------------- ---------- --- ------
34 Flanders Ned M G6H
1 record(s) selected.
20. db2 => select count(*) as numberpergroup,
projectid from projemp group by projectid
NUMBERPERGROUP PROJECTID
-------------- ---------
2 P13
3 P35
1 P43
3 record(s) selected.
21. db2 => update employee set firstname = 'Bozo' where
firstname = 'Ned'
DB20000I The SQL command completed successfully.
db2 => select * from employee
SSN LASTNAME FIRSTNAME SEX DEPTNO
--------- -------------------- ---------- --- ------
245 Simpson Homer M SG7
34 Flanders Bozo M G6H
222 Green Rachel F SG7
333 Bing Changler M S8P
111 Geller Monica F G6H
5 record(s) selected.
22. db2 => delete from employee where lastname like 'G%'
DB20000I The SQL command completed successfully.
db2 => select * from employee
SSN LASTNAME FIRSTNAME SEX DEPTNO
--------- -------------------- ---------- --- ------
245 Simpson Homer M SG7
34 Flanders Bozo M G6H
333 Bing Changler M S8P
3 record(s) selected.
23. db2 => create table junk (firstattr integer,
secondattr decimal(10,2))
DB20000I The SQL command completed successfully.
db2 => select * from junk
FIRSTATTR SECONDATTR
----------- ------------
0 record(s) selected.
db2 => alter table junk add third varchar(20)
DB20000I The SQL command completed successfully.
db2 => select * from junk
FIRSTATTR SECONDATTR THIRD
----------- ------------ --------------------
0 record(s) selected.
24. db2 => list tables
Table/View Schema Type Creation time
------------------------------- --------------- ----- --------------------------
DEPARTMENT SYLVIA T 2004-06-21-15.38.51.804343
DEPTLOCATIONS SYLVIA V 2004-06-21-16.05.12.051085
EMPLOYEE SYLVIA T 2004-06-21-15.38.35.567546
JUNK SYLVIA T 2004-06-21-16.26.20.210302
PROJECT SYLVIA T 2004-06-21-15.39.42.940604
PROJEMP SYLVIA T 2004-06-21-15.40.05.233869
PROJLOCATIONS SYLVIA V 2004-06-21-16.06.37.274142
7 record(s) selected.
db2 => drop table junk
DB20000I The SQL command completed successfully.
db2 => list tables
Table/View Schema Type Creation time
------------------------------- --------------- ----- --------------------------
DEPARTMENT SYLVIA T 2004-06-21-15.38.51.804343
DEPTLOCATIONS SYLVIA V 2004-06-21-16.05.12.051085
EMPLOYEE SYLVIA T 2004-06-21-15.38.35.567546
PROJECT SYLVIA T 2004-06-21-15.39.42.940604
PROJEMP SYLVIA T 2004-06-21-15.40.05.233869
PROJLOCATIONS SYLVIA V 2004-06-21-16.06.37.274142
6 record(s) selected.
25. db2 => terminate
DB20000I The TERMINATE command completed
successfully.
obelix[33]% db2stop
10/01/2009 14:16:06 0 0 SQL1064N
DB2STOP processing was successful.
SQL1064N DB2STOP processing was successful.