|
Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com |
From: Martin Gainty (mgainty
hotmail.com)
Date: Fri Jan 18 2008 - 16:18:05 CST
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
the default DB is mysql
to verify execute mysql client and then show the databases
mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| catalog |
| mysql |
| petclinic |
| test |
+--------------------+
5 rows in set (0.02 sec)
now if I want to create a ttable in the test DB first I must connect to the
DB e.g.
mysql> connect test;
Connection id: 21
Current database: test
now ALL SQL Statements such as creates/inserts/updates/deletes/selects will
work using the test DB
(you must do the same for Testdb Database)
HTH
M-
----- Original Message -----
From: "Kerry Frater" <kerry
myforefathers.co.uk>
To: "'Sebastian Mendel'" <lists
sebastianmendel.de>; "'MySql'"
<mysql
lists.mysql.com>
Sent: Friday, January 18, 2008 10:03 AM
Subject: RE: creating temp file, modifying data and putting into other table
> I have just tried it with lowercase with the same result.
>
> To test I have opened up the query browser and typed 3 lines
>
> create temporary table ttable1 (select * from testnames where
ref='ABCDE');
> update ttable1 set ref='12345678';
> select * from ttable1;
>
> I leave the cursor on the 3rd line and click on execute. I get the result
>
> Testdb.ttable1 doesn't exist error 1146
>
> If I leave the cursor on the first line then it appears to execute the
first
> line as I do not get an error but no data is shown.
>
> Does the browser run a script? Is that why I am getting problems and I
> should be testing in another way?
>
> Kerry
>
> -----Original Message-----
> From: Sebastian Mendel [mailto:lists
sebastianmendel.de]
> Sent: 18 January 2008 13:24
> To: kerry
myforefathers.co.uk; 'MySql'
> Subject: Re: creating temp file, modifying data and putting into other
table
>
> Kerry Frater schrieb:
> > Can someone please advise. I am looking to create a "multiuser" friendly
> way
> > of getting a subset number of rows from a table into another whilst
making
> a
> > modification.
> >
> > I thought that this could be done using a temporary table in a batch
> script
> > that is unique to that session e.g.
> >
> > create temporary table Ttable1 (select * from masterlist where
> ref='ABCDE');
> > update Ttable1 set ref='SMI0C001';
> > insert into sublist select * from Ttable1;
> > drop Ttable1;
> >
> > I know the above syntax doesn't work but it shows the steps I am looking
> to
> > take.
> >
> > Hope this makes enough sense to be able to answer.
>
> did you tried with lowercase table names (ttable1) too?
>
> --
> Sebastian
>
>
> --
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:
> http://lists.mysql.com/mysql?unsub=kerry
myforefathers.co.uk
>
>
> --
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe: http://lists.mysql.com/mysql?unsub=mgainty
hotmail.com
>
>
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]