If its one time .. i will suggest to take a mysqldump of table structure
only and drop the database import the backup .
[EMAIL PROTECTED] wrote:
Hi All,
How do I delete all the rows of all the tables(but not
table) in the database at one shot.
Regards,
Ravi K
The
DELETE FROM table
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Wednesday, September 20, 2006 10:35 AM
To: mysql@lists.mysql.com
Subject: How to delete all rows
Hi All,
How do I delete all the rows of all the tables(but not
table) in the
You might also look at TRUNCATE table...
http://dev.mysql.com/doc/refman/5.0/en/truncate.html
I believe that DELETE will not reclaim the storage space while
TRUNCATE does, although I didn't see that in the documentation when I
looked just now... ?
Douglas Sims
[EMAIL PROTECTED]
On Sep
I´m not sure if i understood clearly.
If you want to list the area and all of companies near it, you could do it:
select
a.AreaName as Area,
group_concat(c.CompanyName) as Companys
from
AreaCompanys a_c,
Area a,
Company c
where
a_c.AreaID=a.AreaID and
FLUSH table ??
Quoting Peter Lauri [EMAIL PROTECTED]:
DELETE FROM table
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Wednesday, September 20, 2006 10:35 AM
To: mysql@lists.mysql.com
Subject: How to delete all rows
Hi All,
Hi André,
you can do it like:
SELECT a.*
FROM tablea a
LEFT JOIN tableb b ON b.a_id = a.a_id AND b.flag = 'y'
WHERE b.b_id IS NULL;
/Johan
André Hänsel skrev:
Hello list,
I have two tables:
Table A
a_id name
1a
2b
3c
Table B
b_id a_id flag name
12yx
22ny
Following is one way of doing what you want.
mysql show create table t;
+---
+---
-+
| Table | Create
Table
Hi list,
I'm trying to install MySQL 5.0.24a RHEL RPM on a Centos Linux VPS box.
uname -a output on this box:
Linux my.host.com 2.6.9-022stab078.14-enterprise #1 SMP Wed Jul 19 14:35:02
MSD 2006 i686 athlon i386 GNU/Linux
It already has MySQL 4.1 RHEL installed on it - I checked this with rpm
Hi,
I have 4-5 different types of models which can be tagged. So, in the taggings
table should I declare a multicolumn index on [taggable_type, taggable_id] or
a single column index on [taggable_id]. What are the pros and cons of either,
and which one is preferred?
If multicolumn, then in what
Roberto
anybody knows how i should interpret the (null)
value in a field in order to visual.net can recognize
as just null and then make desicions?
Compare it to DBNull.Value.
PB
-
Roberto William Aranda-W Roman wrote:
hello
anybody knows how i should interpret the (null) value
I'm trying to create stored procedure, but after reading mysql's online
document, I was not able to comprehend its usage. Here is what I do, put in
target zip code and miles range, then find a list of zipcode, city, state
and miles from target zip code. How do I get around to it?
[code]
SET
But how will that interact with the auto increment counter? Will
truncate reset the counter.
Chris wrote:
Peter Lauri wrote:
DELETE FROM table
Truncate will be a lot better.
DELETE FROM table will do it row by row which also means it will have to
update any indexes applicable to the
Hi,
I prefer using TRUNCATE statement.
syntax:
TRUNCATE [TABLE] tbl_name
This takes lesser time when compared to the delete from table. It takes hardly
few seconds. take a backup before executing this if required.
Regards,
N.Pradeep Chandru.
-Original Message-
From: Peter Lauri
Peter Lauri wrote:
DELETE FROM table
Truncate will be a lot better.
DELETE FROM table will do it row by row which also means it will have to
update any indexes applicable to the table as it goes...
Lots of data lots of indexes = very slow.
--
MySQL General Mailing List
For list archives:
Sorry, did not read carefully.
Either you loop thru all tables an do DELETE FROM table
Or as someone else suggested, dump the structure, drop database, recreate
from dump.
/Peter
-Original Message-
From: Peter Lauri [mailto:[EMAIL PROTECTED]
Sent: Wednesday, September 20, 2006 2:56 PM
Hi
I've the following tables
(holds a list of companies)
TableName:Company
CompanyID (int)
CompanyName (varchar)
(holds a list of areas)
TableName:Area
AreaID (int)
AreaName (varchar)
(holds a list of what areas are near to what companies),
TableName:AreaCompanys
CompanyID (int)
AreaID
Surendra -
The answer is - it depends.
A multi-column index can be helpful for performance over single-column
- or it can do you no good at all, depending on how you build it and
how you use it.
MySQL currently uses (at most) one index per instance of a table per
query. This means that adding
I need to update a table with the contents of a CSV file regularly, I've
used mysqlimport to load all the initial data, but I have a problem with
using it for updates. The data in the CSV file does not contain all of the
data in the table, there is a field that is updated by another application
If anyone would be interested in a contract, please contact me!
Thanks!
Leann Das
Recruiter, TiVo
http://www.tivo.com/ http://www.tivo.com/
[EMAIL PROTECTED]
Phone: 408-519-9134
Get the inside track to great jobs at TiVo
This person ought to be in USA?
Leann Das [EMAIL PROTECTED] escreveu na mensagem
news:[EMAIL PROTECTED]
If anyone would be interested in a contract, please contact me!
Thanks!
Leann Das
Recruiter, TiVo
http://www.tivo.com/ http://www.tivo.com/
[EMAIL
At 03:16 AM 9/20/2006, Johan Höök wrote:
Hi André,
you can do it like:
SELECT a.*
FROM tablea a
LEFT JOIN tableb b ON b.a_id = a.a_id AND b.flag = 'y'
WHERE b.b_id IS NULL;
/Johan
Johan,
I don't think that is going to work. How is it going to have
b.flag='Y' when it can't find the b
Hi,
I've been trying to figure this out for a while..
I have a table ITEMS with about 15 fields that can be used in any
combination in where queries, let me call these fields f1 to f15.
There are also 3 fields used for ordering, let's call them o1 to o3.
So the table is:
tablename (id, title,
If the combination of fields that will be subject to 'where' is unknown, and
will be unknown forever, then I think you have no choice but to index each one
individually and let MySQL make the choice as to which one to use.
If, however, you know, or can establish, that certain combinations of
Peter
It doesn't seem like it would make sense to make an index for
every
possible combination... but there must be a way to do this
intelligently?
It does not make sense for inserts and updates, but it sure makes sense
for reproting, so have you considered separating your functionality
Wagner, Chris (GEAE, CBTS) wrote:
But how will that interact with the auto increment counter? Will
truncate reset the counter.
According to the docs it will:
http://dev.mysql.com/doc/refman/5.1/en/truncate.html
The table handler does not remember the last used AUTO_INCREMENT value,
but
Neil Tompkins wrote:
Hi
I've the following tables
(holds a list of companies)
TableName:Company
CompanyID (int)
CompanyName (varchar)
(holds a list of areas)
TableName:Area
AreaID (int)
AreaName (varchar)
(holds a list of what areas are near to what companies),
hi,
You can use DBNull.
DBNull - First it returns true if such a value is null, then converts the value
to an empty string if it is null.
For instance,
If dbval Is DBNull.value then
return
End If
Thanks
ViSolve DB Team.
- Original Message -
From: Roberto William Aranda-W Roman
27 matches
Mail list logo