, MySQL
already does much which the SQL programmer wants and cannot come at:
An auto-updated column is automatically updated to the current
timestamp when the value of any other column in the row is changed from
its current value. An auto-updated column remains unchanged if all other
columns
On 2015/04/12 08:52, Pothanaboyina Trimurthy wrote:
The problem is , as mentioned the load data is taking around 2 hours, I
have 2 timestamp columns for one column I am passing the input through load
data, and for the column DB_MODIFIED_DATETIME no input is provided, At
the end of the load data
Hi All,
I am facing an issue with timestamp columns while working with MySQL load
data in file, I am loading around a million records which is taking around
2 hours to complete the load data.
Before get into more details about the problem, first let me share the
table structure.
CREATE TABLE
the
timestampy part to another table, and join them when needed.
On 4/8/15 6:36 AM, Martin Mueller wrote:
I understand how a timestamp column automatically changes when there is a
change in a data row. Is it possible to limit the update to changes in
particular columns? I have a table where I
how a timestamp column automatically changes when there is a
change in a data row. Is it possible to limit the update to changes in
particular columns? I have a table where I care about changes in any of
four different columns, but I don¹t care about changes in other
columns or
added columns
I think you'd have to do that with a trigger.
On 4/8/15 6:36 AM, Martin Mueller wrote:
I understand how a timestamp column automatically changes when there is a
change in a data row. Is it possible to limit the update to changes in
particular columns? I have a table where I care about changes
W dniu 08.04.2015 o 17:42, Andrew Wallace pisze:
I think you'd have to do that with a trigger.
+1 for using triggers.
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql
I understand how a timestamp column automatically changes when there is a
change in a data row. Is it possible to limit the update to changes in
particular columns? I have a table where I care about changes in any of
four different columns, but I don¹t care about changes in other columns or
added
) AS
`2008`,
SUM(CASE WHEN YEAR(sales.Date)='2009' THEN sales.Total ELSE NULL END) AS
`2009`,
...
WHERE dynamic predicate that only has results in one year
However, this pattern will often result in numerous empty columns -- empties
that would not be there had the table not been pivoted.
What
)='2008' THEN sales.Total ELSE NULL END) AS
`2008`,
SUM(CASE WHEN YEAR(sales.Date)='2009' THEN sales.Total ELSE NULL END) AS
`2009`,
...
WHERE dynamic predicate that only has results in one year
However, this pattern will often result in numerous empty columns -- empties
that would
2014/10/08 11:38 -0700, Jan Steinman
However, this pattern will often result in numerous empty columns -- empties
that would not be there had the table not been pivoted.
2014/10/08 16:42 -0500, Peter Brawley
MySQL stored procedures are less incomplete, and can do it, but they're
awkward
- Original Message -
From: Johan De Meersman vegiv...@tuxera.be
Subject: Re: SHOW FULL COLUMNS QUERIES hogging my CPU
In any case, this is nothing that can be fixed on the database level.
I may or may not have to swallow that :-p
I've been hammering a munin plugin that graphs
On 6/3/2014 4:47 PM, Johan De Meersman wrote:
- Original Message -
From: Johan De Meersman vegiv...@tuxera.be
Subject: Re: SHOW FULL COLUMNS QUERIES hogging my CPU
In any case, this is nothing that can be fixed on the database level.
I may or may not have to swallow that :-p
I've
Connector/J and found the getColumns() method
building a stringBuffer object which evetually runs this SHOW FULL
COLUMNS queries. I have to look at my code where ever this method is
called and make sure we dont do it. But i have not nailed this down. It
is still just an assumption that i have
file was a whopping 4 GB is size. Upon analyzing the queries i
found that there were a total of 30 million queries made to the Database
out of which 10 million queries were only doing SHOW FULL COLUMN queries.
The SHOW FULL COLUMN queries were of the format as below:
SHOW FULL COLUMNS FROM
of the format as below:
SHOW FULL COLUMNS FROM `APIC_PHY_FABRIC_PHYSICAL_INTERFACE` FROM
`db_private_admin` LIKE '%'
This is causing considerable cpu usage in %user_time in my system
fix your application - there is no single reason to run such
queries 10 million times because the result won't change
FULL COLUMN queries were of the format as below:
SHOW FULL COLUMNS FROM `APIC_PHY_FABRIC_PHYSICAL_INTERFACE` FROM
`db_private_admin` LIKE '%'
This is causing considerable cpu usage in %user_time in my system
fix your application - there is no single reason to run such
queries 10 million times
many
columns? is it a table or a view?
On Mon, Jun 2, 2014 at 10:21 AM, Jatin Davey jasho...@cisco.com wrote:
On 6/2/2014 7:18 PM, Reindl Harald wrote:
Am 02.06.2014 15:35, schrieb Jatin Davey:
I am no expert with mysql and databases. Hence seeking out some help on
this forum.
Basically i
made to the Database out of which 10 million queries
were only doing SHOW FULL COLUMN queries.
The SHOW FULL COLUMN queries were of the format as below:
SHOW FULL COLUMNS FROM `APIC_PHY_FABRIC_PHYSICAL_INTERFACE` FROM
`db_private_admin` LIKE '%'
This is causing considerable cpu usage
as below:
SHOW FULL COLUMNS FROM
`APIC_PHY_FABRIC_PHYSICAL_INTERFACE` FROM
`db_private_admin` LIKE '%'
This is causing considerable cpu usage in %user_time in my
system
fix your application - there is no single reason to run
100 million rows, this will still
cause your query to visit a very large number of them.
So, I would have to ask: how many records are in that table? How many
columns? is it a table or a view?
On Mon, Jun 2, 2014 at 10:21 AM, Jatin Davey jasho...@cisco.com wrote:
On 6/2/2014 7:18 PM, Reindl
million queries made to the Database out of which 10
million queries were only doing SHOW FULL COLUMN queries.
The SHOW FULL COLUMN queries were of the format as below:
SHOW FULL COLUMNS FROM
`APIC_PHY_FABRIC_PHYSICAL_INTERFACE` FROM
Hi Jatin,
On Jun 2, 2014, at 7:56 AM, Jatin Davey jasho...@cisco.com wrote:
I found this blog while trying to find a fix for my problem. Thought it might
be useful to share.
Here it is:
http://whirlpool.net.au/blog/5
To confirm - did you manage to fix your problem?
I was about to
- Original Message -
From: Jatin Davey jasho...@cisco.com
Subject: Re: SHOW FULL COLUMNS QUERIES hogging my CPU
Certain part of our code uses DataNucleas while other parts of the code
A data persistence product... there's your problem.
Persisting objects into a relational database
I got an interesting problem with creation of indexes on MyISAM
tables in MySQL 5.6.15 and MySQL 5.6.14 running on FreeBSD 8.4 for float
columns - I am not able to create indexes on these columns
Indexes on all other columns work just fine
The problem occur while I was loading data from MySQL
Hi All.
I would like to change the layout of my production database, I would like
to add a column to an existing table. As I think before the ALTER TABLE
statement all access to the database should be denied/ended, then the ALTER
TABLE should be performed, and then user/applications should be
- Original Message -
From: Rafał Radecki radecki.ra...@gmail.com
I would like to change the layout of my production database, I would
like to add a column to an existing table. As I think before the ALTER
TABLE statement all access to the database should be denied/ended, then the
Have you used pt-online-schema-change.html from
http://www.percona.com/doc/percona-toolkit/2.0/pt-online-schema-change.html ?
What do you think about this tool?
Best regards,
Rafal Radecki.
2013/7/8 Rafał Radecki radecki.ra...@gmail.com
Hi All.
I would like to change the layout of my
On 2013-03-21 8:12 AM, Norah Jones wrote:
I'm trying to create a foreign key on two columns but getting error...
Here's what I tried:
CREATE TABLE test2 (
ID INT NOT NULL AUTO_INCREMENT,
col1 INT NOT NULL,
col2 INT NOT NULL,
PRIMARY KEY (ID),
CONSTRAINT
On 3/21/2013 12:43 PM, Abhishek Choudhary wrote:
CREATE TABLE test2 (
ID INT NOT NULL AUTO_INCREMENT,
col1 INT NOT NULL,
col2 INT NOT NULL,
PRIMARY KEY (ID),
CONSTRAINT fk FOREIGN KEY (col1, col2)
REFERENCES test1(ID,
...@earthlink.net
To: mysql@lists.mysql.com
Cc:
Sent: Thursday, 21 March 2013 8:14 PM
Subject: Re: Foreign key on multiple columns
On 2013-03-21 8:12 AM, Norah Jones wrote:
I'm trying to create a foreign key on two columns but getting error...
Here's what I tried:
CREATE TABLE test2
Something like:
select aname,max(adate)
group by aname;
On Thu, November 22, 2012 11:06, sagar bs wrote:
Hi all,
I have the table with two columns(account_name and order_date). In the
account_name col, some account names are only once and few account names
are twice and few others are 3/4
to calculated columns in other columns. I thought
a column alias would do it, but apparently they're only for
aggregation, like GROUP BY.
Other than repeating the entire calculation, what techniques are
available for accessing such a calculation?
I'm calculating an electric bill, based on meter
I would like to refer to calculated columns in other columns. I thought a
column alias would do it, but apparently they're only for aggregation, like
GROUP BY.
Other than repeating the entire calculation, what techniques are available for
accessing such a calculation?
I'm calculating
, October 03, 2012 4:09 PM
To: mysql@lists.mysql.com
Subject: Accessing Column Aliases In Other Columns?
I would like to refer to calculated columns in other columns. I thought
a column alias would do it, but apparently they're only for
aggregation, like GROUP BY.
Other than repeating the entire
- Original Message -
From: Rick James rja...@yahoo-inc.com
* should not begin with the table name
Personally, I tend to prefix all column names with three-letter abbreviations
of the table name, so that they are both unique across joins, and it's obvious
what table they're from
, May 21, 2012 5:27 AM
To: Rick James
Cc: da...@lorenso.com; mysql@lists.mysql.com
Subject: Re: create alias for columns bound to database?
- Original Message -
From: Rick James rja...@yahoo-inc.com
* should not begin with the table name
Personally, I tend to prefix all column
All,
I'd like to be able to create column aliases which are bound to the
database itself. I have an assortment of columns without naming
standards which i'd like to migrate to a better naming scheme.
Is there a feature in MySQL that would allow me to give a database
column multiple names
@lists.mysql.com
Subject: create alias for columns bound to database?
All,
I'd like to be able to create column aliases which are bound to the
database itself. I have an assortment of columns without naming
standards which i'd like to migrate to a better naming scheme.
Is there a feature in MySQL
18, 2012 2:22 PM
To: mysql@lists.mysql.com
Subject: create alias for columns bound to database?
All,
I'd like to be able to create column aliases which are bound to the
database itself. I have an assortment of columns without naming
standards which i'd like to migrate to a better naming
Am 22.03.2012 05:41, schrieb Brown:
Look man, there has to be someone out there that can tell me why one user
table
has 5 extra columns. Is it version related or my sysprog person missed out on
a
step. Its hard to believe that this problem is unique to my site.
logically is it version
*plonk*
- Original Message -
From: Charles Brown cbr...@bmi.com
To: Reindl Harald h.rei...@thelounge.net
Cc: MySql mysql@lists.mysql.com
Sent: Thursday, 22 March, 2012 5:37:00 AM
Subject: tables do not have the same number of columns.
I have two mysql instances in my mysql cluster
On 22/03/2012 04:41, Brown, Charles wrote:
Look man, there has to be someone out there that can tell me why one
user table has 5 extra columns.
As far as I can see, plenty of people already have told you.
Is it version related or my sysprog person missed out on a step.
Yes, it's related
: One inst has 39 columns- the other 40
Am 22.03.2012 05:41, schrieb Brown:
Look man, there has to be someone out there that can tell me why one
user table has 5 extra columns. Is it version related or my sysprog
person missed out on a step. Its hard to believe that this problem is unique
Brown cbr...@bmi.com, mysql@lists.mysql.com
Sent: Wednesday, 21 March, 2012 6:27:17 AM
Subject: RE: One inst has 39 columns- the other 40
I have two mysql instances in my mysql cluster. I noticed that their
MysSQL.user tables do not have the same number of columns. Their
USER table attributes
Am 21.03.2012 06:27, schrieb Brown:
I have two mysql instances in my mysql cluster. I noticed that their
MysSQL.user tables do not have the same number of columns. Their USER table
attributes are not the same. One instance has 39 columns while the other has
42 columns. Can someone please
You keep repeating that, and I already replied to it the first time. If my
answer isn't acceptable, spamming the question isn't going to make it
better - or make people more inclined to help you, for that matter.
I concur
--
Rik Wasmus
--
MySQL General Mailing List
For list archives:
I have two mysql instances in my mysql cluster. I noticed that their
MysSQL.user tables do not have the same number of columns. See below for their
attributes. Is anyone out there has any idea why these tables are not the same?
Can someone help me.
Hostchar(60
Look man, there has to be someone out there that can tell me why one user table
has 5 extra columns. Is it version related or my sysprog person missed out on a
step. Its hard to believe that this problem is unique to my site.
Hostchar(60)NO PRI
Userchar(16
Charles,
You should run SELECT @@version on both nodes. It looks like you have
different version' schemas.
-NT
Em 22-03-2012 04:41, Brown, Charles escreveu:
Look man, there has to be someone out there that can tell me why one user table
has 5 extra columns. Is it version related or my
. It looks like you have
different version' schemas.
-NT
Em 22-03-2012 04:41, Brown, Charles escreveu:
Look man, there has to be someone out there that can tell me why one user
table has 5 extra columns. Is it version related or my sysprog person missed
out on a step. Its hard to believe
I have two mysql instances in my mysql cluster. I noticed that their
MysSQL.user tables do not have the same number of columns. Their USER table
attributes are not the same. One instance has 39 columns while the other has 42
columns. Can someone please help me here. Could it be because I'm
- Original Message -
From: Charles Brown cbr...@bmi.com
I have two mysql instances in my mysql cluster. I noticed that their
MysSQL.user tables do not have the same number of columns. Their
USER table attributes are not the same. One instance has 39 columns
while the other has 42
I have two mysql instances in my mysql cluster. I noticed that their
MysSQL.user tables do not have the same number of columns. Their USER table
attributes are not the same. One instance has 39 columns while the other has 42
columns. Can someone please help me here. Could it be because I'm
I have two mysql instances in my mysql cluster. I noticed that their
MysSQL.user tables do not have the same number of columns. Their USER table
attributes are not the same. One instance has 39 columns while the other has 42
columns. Can someone please help me here. Could it be because I'm
On 29 Oct 2011, at 22:59, luci spam wrote:
I have 2 servers (1 for development, 1 for service)
I keep ADD/DELETE columns and CREATE/DELETE Indexes on my development
server, so these 2 server have similar but different mysql data structures.
I know there's an option to expert structures
I have 2 servers (1 for development, 1 for service)
I keep ADD/DELETE columns and CREATE/DELETE Indexes on my development
server, so these 2 server have similar but different mysql data structures.
I know there's an option to expert structures only. (like –no-data)
Is there a way (except 3rd
I just discovered that MySQL Workbench actually WILL connect columns. Use
the #6 wire type shortcut (bottom one).
However, I must be retarded or blind because I can't figure out how to make
the diagram have more than the default of 2 pages. I have a database with 50
tables and they just don't
connecting the actual
columns?
I am evaluating various tools for diagram generating of existing databases
on some smaller databases (9 tables or so) first.
The two I've tried so far are these:
http://dev.mysql.com/downloads/workbench/
http://www.sqlmaestro.com/download/#mysql
Both _seem_ robust
@lists.mysql.com
Subject: RE: Any table visualization tools with wires connecting the
actual
columns?
At 05:36 PM 4/7/2011, Daevid Vincent wrote:
I am a paid subscriber to SQLYog -- I love that tool, but AFAIK it
doesn't do diagrams (with wires between tables and all that glory). Am
I wrong
- Original Message -
From: Daevid Vincent dae...@daevid.com
It only seems to do the lines for InnoDB tables, not MyISAM... I
mean, it not only won't auto-connect them, it won't even allow ME to connect
them. :(
Probably because it wants to adhere to the engine capabilities, and
columns?
I am evaluating various tools for diagram generating of existing databases
on some smaller databases (9 tables or so) first.
The two I've tried so far are these:
http://dev.mysql.com/downloads/workbench/
http://www.sqlmaestro.com/download/#mysql
Both _seem_ robust and cosmetically
on this? I've written to SQL Maestro twice
and they've not replied either.
From: Daevid Vincent [mailto:dae...@daevid.com]
Sent: Friday, April 01, 2011 4:27 PM
To: mysql@lists.mysql.com
Subject: Any table visualization tools with wires connecting the actual
columns?
I am evaluating various
to emails
and forum posts.
Mike
From: Daevid Vincent [mailto:dae...@daevid.com]
Sent: Friday, April 01, 2011 4:27 PM
To: mysql@lists.mysql.com
Subject: Any table visualization tools with wires connecting the actual
columns?
I am evaluating various tools for diagram generating of existing
:36 PM
To: mysql@lists.mysql.com
Subject: Re: Any table visualization tools with wires connecting the
actual
columns?
At 02:17 PM 4/7/2011, Daevid Vincent wrote:
Does anyone have any suggestions on this? I've written to SQL Maestro
twice and they've not replied either.
Take a look
@lists.mysql.com
Subject: Re: Any table visualization tools with wires connecting the
actual
columns?
Toad for MySQL can do the diagramming piece...but, it looks and feels like
you might have some of the same frustrations with it as well. But,
another
tool worth exploring nonetheless.
On Thu
columns?
At 02:17 PM 4/7/2011, Daevid Vincent wrote:
Does anyone have any suggestions on this? I've written to SQL Maestro
twice and they've not replied either.
Take a look at SqlYog from www.webyog.com. I use their community version
but their paid version has a schema designer
with what links to what -- that I
tell it to. It's further exacerbated by the fact that the documentation
indicates these aren't even REAL keys, they are cosmetic only! WTF? Why add
confusion guys?
1. Neither one seem to be smart enough to automatically know that columns of
the same name should
,
but only in combination with the column type. This is why I need to use a
foreign key with 2 columns.
Is there a solution for what I want, or I will need to add that extra
column
with unique values in all the tables that reference the table `constants`?
Thank you.
Octavian
--
MySQL
reference the table
constants and in this table the IDs of the constants are not unique alone,
but only in combination with the column type. This is why I need to use a
foreign key with 2 columns.
Is there a solution for what I want, or I will need to add that extra column
with unique values
ALTER TABLE tablename1 CHANGE column1 column2 VARCHAR(64), CHANGE column2
column1 VARCHAR(64)
Assuming the columns are varchar(64)
Jangita | +254 76 918383 | MSN Y!: jang...@yahoo.com
Skype: jangita | GTalk: jangita.nyag...@gmail.com
-Original Message-
From: nixofortune
by row?)
- Original Message - From: nixofortune
nixofort...@googlemail.com
To: mysql@lists.mysql.com
Sent: Wednesday, September 22, 2010 5:29 PM
Subject: Swap data in columns
Hi all.
Sorry for very simple question, just can't figure out the solution.
I need to swap data
Hi all.
Sorry for very simple question, just can't figure out the solution.
I need to swap data in column1 with data in column2.
++-+-+
| id | column1 | column2 |
++-+-+
| 1 | a | z |
| 2 | b | y |
| 3 | c | x |
| 4
@lists.mysql.com
Subject: Swap data in columns
Hi all.
Sorry for very simple question, just can't figure out the solution.
I need to swap data in column1 with data in column2.
++-+-+
| id | column1 | column2 |
++-+-+
| 1 | a | z |
| 2 | b | y
Couldn't you just rename the columns?
JW
On Wed, Sep 22, 2010 at 11:53 AM, Rolando Edwards
redwa...@logicworks.netwrote:
I ran these commands:
use test
DROP TABLE IF EXISTS mydata;
CREATE TABLE mydata (id INT NOT NULL AUTO_INCREMENT PRIMARY KEY,column1
CHAR(1),column2 CHAR(2));
INSERT
What about:
select `id`, `column1` as 'column2', `column2` as 'column1';
Steve
On Wed, 2010-09-22 at 13:06 -0500, Johnny Withers wrote:
Couldn't you just rename the columns?
JW
On Wed, Sep 22, 2010 at 11:53 AM, Rolando Edwards
redwa...@logicworks.netwrote:
I ran these commands
:
rolandologicworxredwa...@logicworks.nethttp://www.linkedin.com/in/rolandoedwards
-Original Message-
From: nixofortune [mailto:nixofort...@googlemail.com
nixofort...@googlemail.com]
Sent: Wednesday, September 22, 2010 12:30 PM
To: mysql@lists.mysql.com
Subject: Swap data in columns
/in/rolandoedwards
-Original Message-
From: nixofortune [mailto:nixofort...@googlemail.com]
Sent: Wednesday, September 22, 2010 12:30 PM
To: mysql@lists.mysql.com
Subject: Swap data in columns
Hi all.
Sorry for very simple question, just can't figure out the solution.
I need to swap
This is even better!
JW
On Wed, Sep 22, 2010 at 2:27 PM, Steve Staples sstap...@mnsi.net wrote:
What about:
select `id`, `column1` as 'column2', `column2` as 'column1';
Steve
On Wed, 2010-09-22 at 13:06 -0500, Johnny Withers wrote:
Couldn't you just rename the columns?
JW
-
From: Egor Shevtsov [mailto:nixofort...@googlemail.com]
Sent: Wednesday, September 22, 2010 4:14 PM
To: MySQL mailing list
Subject: Re: Swap data in columns
Hi Rolando,
This is perfect solution I was looking for.
Why do you use left join here? It looks like inner join works fine as well.
Thanks
by row?)
- Original Message -
From: nixofortune nixofort...@googlemail.com
To: mysql@lists.mysql.com
Sent: Wednesday, September 22, 2010 5:29 PM
Subject: Swap data in columns
Hi all.
Sorry for very simple question, just can't figure out the solution.
I need to swap data in column1
Hi,
I've the following basic SUM for our products based on a rating.
SELECT SUM(products.rating) AS products_rating
FROM products_sales
INNER JOIN products ON products_sales.products_id = products.products_id
WHERE products.enabled = 1
AND products_sales.language = 'EN'
This works fine, however
I don't think that SUM will work for varchar columns.
If I got your point right - you need to use WITH ROLLUP grouping
http://dev.mysql.com/doc/refman/5.0/en/group-by-modifiers.html
see second example on that page.
regards,
m
-Original Message-
From: Tompkins Neil [mailto:neil.tompk
Sorry I don't want to SUM the varchar columns. This is the parameter passed
that defines the two different queries.
On Tue, Aug 31, 2010 at 11:48 AM, misiaQ mis...@poczta.fm wrote:
I don't think that SUM will work for varchar columns.
If I got your point right - you need to use WITH ROLLUP
SELECT products_sales.language, SUM(products.rating) AS products_rating
FROM products_sales
INNER JOIN products ON products_sales.products_id = products.products_id
WHERE products.enabled = 1
AND products_sales.language IN ('EN','ES')
GROUP BY products_sales.language
Will give the sum for each
Perfect. Exactly what I was looking for.
Cheers John.
Regards,
Neil
On Tue, Aug 31, 2010 at 12:06 PM, John Daisley
daisleyj...@googlemail.comwrote:
SELECT products_sales.language, SUM(products.rating) AS products_rating
FROM products_sales
INNER JOIN products ON products_sales.products_id
Hi,
I also wondered, if there is any way to LIMIT the products.rating for each
language to say the top 25 ?
Cheers
Neil
On Tue, Aug 31, 2010 at 12:11 PM, Tompkins Neil
neil.tompk...@googlemail.com wrote:
Perfect. Exactly what I was looking for.
Cheers John.
Regards,
Neil
On Tue, Aug
Hi
Is it possible in MySQL 5.1 to retrieve three columns in a select sub-query
like below :
SELECT student_age, SELECT (student_subjects_id, random_mark, subject FROM
student_subjects ORDER BY RAND(), LIMIT 1)
FROM students
WHERE student_age 10
ORDER BY RAND()
LIMIT 1
I've looked and tried
columns in a select
sub-query
like below :
SELECT student_age, SELECT (student_subjects_id, random_mark, subject FROM
student_subjects ORDER BY RAND(), LIMIT 1)
FROM students
WHERE student_age 10
ORDER BY RAND()
LIMIT 1
I've looked and tried everything, but nothing seems to work
Souza Neto
Tompkins Neil neil.tompk...@googlemail.com escreveu na mensagem
news:aanlkti=djkujcsg=kf29sjsp0yllhmhb02mqzdvzd...@mail.gmail.com...
Hi
Is it possible in MySQL 5.1 to retrieve three columns in a select
sub-query
like below :
SELECT student_age, SELECT (student_subjects_id
select ci.*, ct.* from (select name, countrycode from city) ci, country ct
where ci.countrycode = ct.code
Regards,
m
-Original Message-
From: Tompkins Neil [mailto:neil.tompk...@googlemail.com]
Sent: Wednesday, August 25, 2010 1:23 PM
To: [MySQL]
Subject: Retrieve three columns in sub
three columns in a select
sub-query
like below :
SELECT student_age, SELECT (student_subjects_id, random_mark, subject
FROM
student_subjects ORDER BY RAND(), LIMIT 1)
FROM students
WHERE student_age 10
ORDER BY RAND()
LIMIT 1
I've looked and tried everything, but nothing seems
: Tompkins Neil [mailto:neil.tompk...@googlemail.com]
Sent: Wednesday, August 25, 2010 1:23 PM
To: [MySQL]
Subject: Retrieve three columns in sub query
Hi
Is it possible in MySQL 5.1 to retrieve three columns in a select sub-query
like below :
SELECT student_age, SELECT
I know that you can ignore certain databases and tables in mysql
replication, but is it possible to replicate all but a certain column or
two from a table? This is 5.1.48 on linux.
Thanks,
Bryancan
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:
No.
If it is for security reasons: did you think about a view on slave db?
(removing rights from source table)
In case you dont want those columns to reach the slave you could use
triggers to reflect changes from source table (or a view) on master to a
table(with missing columns
Block mode and then selecting and deleting), I removed the columns
that I didn't need (basically, removed every column EXCEPT the Field
column).
I also removed the extra lines that the mysqlshow command adds
(decorative lines, column labels, etc...). Then, I saved this changed
text file.
3
and the SHOW COLUMNS (or its synonym SHOW FIELDS) command:
MySQL :: MySQL 5.0 Reference Manual :: 12.3.1 DESCRIBE Syntax
http://dev.mysql.com/doc/refman/5.0/en/describe.html
MySQL :: MySQL 5.0 Reference Manual :: 12.5.5.5 SHOW COLUMNS Syntax
http://dev.mysql.com/doc/refman/5.0/en/show-columns.html
in your SQL syntax; check the
manual that corresponds to your MySQL server version for the right
syntax to use near 'ORDER BY Field' at line 1
So, I went to read the online documentation about the DESCRIBE command
and the SHOW COLUMNS (or its synonym SHOW FIELDS) command:
MySQL :: MySQL 5.0
Hi all
I have this query:
SELECT n.ID, n.CatalogNumber, [...more...], d.ID, d.CatalogNumber, [...more...]
FROM newdarwincoredata n
INNER JOIN darwincoredata d ON n.CatalogNumber = d.CatalogNumber
ORDER BY n.CatalogNumber;
Both tables have exactly the same structure and indices:
mysql SHOW
select into outfile was the ticket. Thanks!
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org
1 - 100 of 848 matches
Mail list logo