Discussion:
How to create a schema
Ayyaparaju Ganapathiraju
2003-02-19 01:30:25 UTC
Permalink
Hi,

I have two questions here, please.

1). Is there an equivalent to creating a schema in MySQL. I would like to
create tables in multiple schemas within the same database. Some of the
tables will have foregign keys across schemas.

I'm aware that I can create multiple databases and switch between databases
using "use <database name>".

2). How can I edit a statement within mysql. Suppose if I make a typo in a
large select statement, can I go into an editor and fix it, then execute it
from the buffer.

Any suggestions.

Raju Ganapathiraju



_________________________________________________________________
Protect your PC - get McAfee.com VirusScan Online
http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963


---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)

To request this thread, e-mail <mysql-***@lists.mysql.com>
To unsubscribe, e-mail <mysql-unsubscribe-gcdmg-mysql=***@lists.mysql.com>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
kk
2003-02-19 05:48:41 UTC
Permalink
Maybe If I get you in the right way, the answer for your second question is

you can use SQLYog or similar tools and can use them as a front end.
http://www.webyog.com/


regards
KS

----- Original Message -----
From: "Ayyaparaju Ganapathiraju" <***@hotmail.com>
To: <***@lists.mysql.com>
Sent: Wednesday, February 19, 2003 10:30 AM
Subject: How to create a schema
Post by Ayyaparaju Ganapathiraju
Hi,
I have two questions here, please.
1). Is there an equivalent to creating a schema in MySQL. I would like to
create tables in multiple schemas within the same database. Some of the
tables will have foregign keys across schemas.
I'm aware that I can create multiple databases and switch between databases
using "use <database name>".
2). How can I edit a statement within mysql. Suppose if I make a typo in a
large select statement, can I go into an editor and fix it, then execute it
from the buffer.
Any suggestions.
Raju Ganapathiraju
_________________________________________________________________
Protect your PC - get McAfee.com VirusScan Online
http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963
---------------------------------------------------------------------
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To unsubscribe, e-mail
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)

To request this thread, e-mail <mysql-***@lists.mysql.com>
To unsubscribe, e-mail <mysql-unsubscribe-gcdmg-mysql=***@lists.mysql.com>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Roger Baklund
2003-02-19 12:32:32 UTC
Permalink
* Ayyaparaju Ganapathiraju
Post by Ayyaparaju Ganapathiraju
1). Is there an equivalent to creating a schema in MySQL. I would like to
create tables in multiple schemas within the same database. Some of the
tables will have foregign keys across schemas.
No, there is no consept of 'schema' in mysql, other than the implicit
'schema' resulting from the existing table definitions in a database.
Post by Ayyaparaju Ganapathiraju
I'm aware that I can create multiple databases and switch between databases
using "use <database name>".
Yes, and you can also use multiple databases in the same sql statement,
using the database.table and database.table.column syntax:

select db1.table1.col1,db2.table2.col2
from db1.table1,db2.table2
where db1.table1.id = db2.table2.id
Post by Ayyaparaju Ganapathiraju
2). How can I edit a statement within mysql. Suppose if I make a
typo in a large select statement, can I go into an editor and fix
it, then execute it from the buffer.
If you have a new version of mysql, see the standard client \e command.

It is mentioned here, but I have not found any further documentation:

<URL: http://www.mysql.com/doc/en/mysql.html >

The \e command is not available in earlier versions of mysql, but I did not
find any mention of it in the change history, so I don't know when it became
available. Somewhere between versions 3.23.30 and 3.23.55.

I normally use a text editor, and then either copy&paste my statements
directly into the mysql client, or I execute it from a command line with:

mysql dbname < script.sql

(or "mysql -h host -u usrname -p dbname < script.sql")

HTH,

--
Roger


---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)

To request this thread, e-mail <mysql-***@lists.mysql.com>
To unsubscribe, e-mail <mysql-unsubscribe-gcdmg-mysql=***@lists.mysql.com>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Ayyaparaju Ganapathiraju
2003-02-19 13:07:00 UTC
Permalink
Thank you very much. That information is very helpful as I am just starting
to use/learn MySQL.



Raju Ganapathiraju
Subject: Re: How to create a schema
Date: Wed, 19 Feb 2003 13:32:32 +0100
* Ayyaparaju Ganapathiraju
Post by Ayyaparaju Ganapathiraju
1). Is there an equivalent to creating a schema in MySQL. I would like
to
Post by Ayyaparaju Ganapathiraju
create tables in multiple schemas within the same database. Some of the
tables will have foregign keys across schemas.
No, there is no consept of 'schema' in mysql, other than the implicit
'schema' resulting from the existing table definitions in a database.
Post by Ayyaparaju Ganapathiraju
I'm aware that I can create multiple databases and switch between
databases
using "use <database name>".
Yes, and you can also use multiple databases in the same sql statement,
select db1.table1.col1,db2.table2.col2
from db1.table1,db2.table2
where db1.table1.id = db2.table2.id
Post by Ayyaparaju Ganapathiraju
2). How can I edit a statement within mysql. Suppose if I make a
typo in a large select statement, can I go into an editor and fix
it, then execute it from the buffer.
If you have a new version of mysql, see the standard client \e command.
<URL: http://www.mysql.com/doc/en/mysql.html >
The \e command is not available in earlier versions of mysql, but I did not
find any mention of it in the change history, so I don't know when it
became
available. Somewhere between versions 3.23.30 and 3.23.55.
I normally use a text editor, and then either copy&paste my statements
mysql dbname < script.sql
(or "mysql -h host -u usrname -p dbname < script.sql")
HTH,
--
Roger
---------------------------------------------------------------------
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To unsubscribe, e-mail
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
_________________________________________________________________
Add photos to your e-mail with MSN 8. Get 2 months FREE*.
http://join.msn.com/?page=features/featuredemail


---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)

To request this thread, e-mail <mysql-***@lists.mysql.com>
To unsubscribe, e-mail <mysql-unsubscribe-gcdmg-mysql=***@lists.mysql.com>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Continue reading on narkive:
Loading...