Results 1 to 6 of 6

Thread: drop

  1. #1
    Join Date
    Dec 2007
    Posts
    7

    Unanswered: drop

    what is the difference betweeen drop table and a drop database?

  2. #2
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    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
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

  3. #3
    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!

  4. #4
    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

  5. #5
    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

  6. #6
    Join Date
    Jan 2007
    Location
    Jena, Germany
    Posts
    2,721
    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •