Results 1 to 5 of 5

Thread: Schema in MySQL

  1. #1
    Join Date
    Jun 2007
    Posts
    19

    Unanswered: Schema in MySQL

    Hi,

    is there a possibilty in a MySQL Database to use Schemas? I can't find anything like this.

    Example: select * from schema.table;

    Chris

  2. #2
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    yes, they're called databases

    example: select * from dbname.tablename
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

  3. #3
    Join Date
    Jun 2007
    Posts
    19
    Thx! But for instance in the DB2 I have a database and additional a schema.

    That's not possible in MySQL, right?

  4. #4
    Join Date
    Apr 2006
    Location
    Denver, Co. USA
    Posts
    242
    In mysql, a schema and a database are names for the same thing. Starting in mysql 5.0.2 you can use either syntax -
    Code:
    CREATE {DATABASE | SCHEMA} [IF NOT EXISTS] db_name
        [create_specification [create_specification] ...]

  5. #5
    Join Date
    Jun 2007
    Posts
    19
    thanks,
    Chris

Posting Permissions

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