If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > drop

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 12-28-07, 21:51
ravi30 ravi30 is offline
Registered User
 
Join Date: Dec 2007
Posts: 7
drop

what is the difference betweeen drop table and a drop database?
Reply With Quote
  #2 (permalink)  
Old 12-28-07, 22:15
r937 r937 is offline
SQL Consultant
 
Join Date: Apr 2002
Location: Toronto, Canada
Posts: 19,524
the same as the difference between a sock and a drawer

a database contains tables

drop a table, the table is gone, but drop a database, all the tables in it are gone too
__________________
r937.com | rudy.ca
please visit Simply SQL and buy my book
Reply With Quote
  #3 (permalink)  
Old 12-29-07, 07:18
ravi30 ravi30 is offline
Registered User
 
Join Date: Dec 2007
Posts: 7
sorry i am new can u detail it!

create table ttt(id,name,etc) in cdb195.cts195.

if this is my create command cdb195.cts195 is my tablespace right! then in which database does this table gets stored! Or if im right,the tablespace we define is the database ultimately!
Reply With Quote
  #4 (permalink)  
Old 12-29-07, 13:58
umayer umayer is offline
Registered User
 
Join Date: Dec 2005
Posts: 273
Quote:
Originally Posted by ravi30

create table ttt(id,name,etc) in cdb195.cts195.

the name of your tablespace is cts195 which belongs to the database cdb195
Reply With Quote
  #5 (permalink)  
Old 01-01-08, 00:51
saidulu saidulu is offline
Registered User
 
Join Date: Nov 2007
Posts: 6
Quote:
Originally Posted by ravi30
sorry i am new can u detail it!

create table ttt(id,name,etc) in cdb195.cts195.

if this is my create command cdb195.cts195 is my tablespace right! then in which database does this table gets stored! Or if im right,the tablespace we define is the database ultimately!

Hi Ravi,

If we want to create a table ...we should create it in a tablespace.
That is why you are using IN clause in your statement.

In "IN clause" you can specify the tablespace name only
or
Tablespace name prefixed by its database name

So here the prefix is your databse (i.e) cdb195.
The next part is your tablespace (i.e) cts195.

So your table will get created in table space 'cts195', which is there in database 'cdb195'.

Hope you are clear now....

Cheers...
Saidulu
Reply With Quote
  #6 (permalink)  
Old 01-01-08, 17:02
stolze stolze is offline
Registered User
 
Join Date: Jan 2007
Location: Jena, Germany
Posts: 2,662
Note: The term "database" in DB2 LUW stands for a completely different concept than in DB2 z/OS. A "database" In DB2 z/OS is basically a qualifier for table space names (as schemas are for table names), whereas a "database" in DB2 LUW is more like a subsystem in DB2 z/OS.
__________________
Knut Stolze
IBM DB2 Analytics Accelerator
IBM Germany Research & Development
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On