how to update entire column with different values

2010-02-05 Thread muralikrishna g
hi.. i am in need to update a column with different values in a single query i know how to update a value of single column and single row element, and single row multiple columns. but i dont know how to update multiple values of a single column. if any body know the syntax for it please help me..

RE: how to update entire column with different values

2010-02-05 Thread misiaQ
You mean the SET data type..? http://dev.mysql.com/doc/refman/5.0/en/set.html Regards, m -Original Message- From: muralikrishna g [mailto:muralikrishn...@gmail.com] Sent: Friday, February 05, 2010 10:38 AM To: mysql@lists.mysql.com Subject: how to update entire column with different valu

how to update a entire column elements

2010-02-05 Thread MuraliKrishna
Hi I am in need to update a entire column elements with different values. If any body know the syntax please help me.. Regarding this.. Thanks in advance By Muralikrishna

Re: help me regarding how to use cursor and handler

2010-02-05 Thread Johan De Meersman
A handler is something you handle things by, for example a table you've opened. It's basically a pointer to an object. A cursor, like the one on your screen, keeps track of where you are in a resultset - operations like next() move it around. Those things are only useful to you if you're also good

Re: how to update a entire column elements

2010-02-05 Thread Johan De Meersman
update table set column=value where . "value" may be calculated based on other columns or whatever. If you need to set n rows to arbitrary values, however, you'll need to issue multiple statements. On Fri, Feb 5, 2010 at 11:50 AM, MuraliKrishna < murali_kris...@arthaoptions.com> wrote: > Hi I

Re: how to update a entire column elements

2010-02-05 Thread Jo�o C�ndido de Souza Neto
Are you talking about data in column ou structure of table? "MuraliKrishna" escreveu na mensagem news:4b6bf981.0807c00a.0cba.2...@mx.google.com... > Hi I am in need to update a entire column elements with different values. > If > any body know the syntax please help me.. Regarding this.. Thanks

RE: how to update entire column with different values

2010-02-05 Thread misiaQ
Once you can group your rules into something reasonable you can use syntax like this one: UPDATE city SET cityClass = CASE WHEN population < 1000 THEN 1 WHEN population < 50 THEN 2 WHEN popul

how to view all acounts in a database

2010-02-05 Thread ishaq gbola
Hi Guys, Which command can allow me view all accounts in a Mysql database

help me out for this problem...

2010-02-05 Thread MuraliKrishna
Here I have to update year column with reference to the row id mysql> update table1 -> set year=case when id=1 then 2000 -> when id=2 then 2001 -> when id=3 then 2000 -> when id=4 then 2001 -> when id=5 then 2000 -> when id=6 then 2001 -> else 2003

Re: how to view all acounts in a database

2010-02-05 Thread Suresh Kuna
In the mysql prompt, execute the below use mysql ; select user from user ; will show all the accounts in a MySQL database. On Fri, Feb 5, 2010 at 5:27 PM, ishaq gbola wrote: > Hi Guys, > > Which command can allow me view all accounts in a Mysql database > > > > -- Thanks Suresh Kuna MySQ

RE: help me out for this problem...

2010-02-05 Thread misiaQ
Instead of: -> else 2003 -> where id between 1 and 6; Try -> else 2003 -> end -> where id between 1 and 6; Or maybe even: mysql> update table1 -> set year=case when id IN (1, 2, 4) then 2000 -> when id IN(2, 4, 6) then 2001 -> else 2003 -> end -> where id b

Re: help me out for this problem...

2010-02-05 Thread RaMeSh
See this link. Might me help for you http://answers.yahoo.com/question/index?qid=20070309043307AATLe9k On 5 February 2010 17:46, misiaQ wrote: > Instead of: > -> else 2003 > >-> where id between 1 and 6; > Try >-> else 2003 >-> end > -> where id between 1 and 6; > > Or mayb

Re: how to view all acounts in a database

2010-02-05 Thread RaMeSh
Login to mysql with the command mysql -uroot -px -A use the database mysql mysql> \u mysql View the table name user mysql> show tables; To view the user mysql> select user from user; On 5 February 2010 17:45, Suresh Kuna wrote: > In the mysql prompt, execute the below > > use mysql ;

Re: how to update a entire column elements

2010-02-05 Thread RaMeSh
Kindly draft you question clearly with scenario example, so that the solution should be clear. On 5 February 2010 16:20, MuraliKrishna wrote: > Hi I am in need to update a entire column elements with different values. > If > any body know the syntax please help me.. Regarding this.. Thanks in > a

Help optimizing settings?

2010-02-05 Thread Ken D'Ambrosio
I've got a fairly large -- 100+ GB -- MySQL database. It isn't accessed often -- it's acting more as an archive right now than anything else. That being said, when it does get accessed, the indeces seem to take forever to load. Being as I just bumped the RAM from 2 GB to 6 GB, what, generically,

Re: Help optimizing settings?

2010-02-05 Thread Johan De Meersman
Using "load index" might help, but you'll have to make sure you allocate plenty of space to your keycache. If the queries are identical, the query cache might also be a good candidate, but that seems unlikely. The memory will also be used by your OS to cache often-used parts of the filesystem, inc

RE: Help optimizing settings?

2010-02-05 Thread Ilya Kazakevich
Which MySQL server do you use? What is your storage engine? -Original Message- From: Ken D'Ambrosio [mailto:k...@jots.org] Sent: Friday, February 05, 2010 5:26 PM To: mysql@lists.mysql.com Subject: Help optimizing settings? I've got a fairly large -- 100+ GB -- MySQL database. It isn't

Re: Help optimizing settings?

2010-02-05 Thread Stein, Olaf
In general you need to adjust your server settings to actually use the new RAM. This depends on various things, storage engines used, what else runs on the box, etc. In addition you should look at your schema, see if you have the right indices for what you want to do. E.g. All columns that you u

Business Key Generation

2010-02-05 Thread Tom Goring
Hi, I have a table that I need to migrate some data into: CREATE TABLE `employee` ( `employeeid` bigint(20) NOT NULL auto_increment, .. `reference` varchar(20) default NULL, `fkcompanyid` bigint(20) default NULL, PRIMARY KEY (`employeeid`), KEY `FK4722E6AE82D7E095` (`fkcompanyid`), CONS

RE: Business Key Generation

2010-02-05 Thread Gavin Towey
Your auto-increment could be effectively a row number. Otherwise there is this technique with user variables: SET @rownum := 0; SELECT @rownum:=...@rownum+1 as ROWNUM, ... FROM ... ; Regards, Gavin Towey -Original Message- From: Tom Goring [mailto:tom.gor...@gmail.com] Sent: Friday, Fe

Re: how to view all acounts in a database

2010-02-05 Thread Евгений Килимчук
Hi! Use mysql client: mysql> *SELECT `user`, `host` FROM `mysql`.`user` LIMIT 0, 5;* 2010/2/5 ishaq gbola : > Hi Guys, > > Which command can allow me view all accounts in a Mysql database > > > > -- Best regards, Eugene Kilimchuk

Re: how to view all acounts in a database

2010-02-05 Thread John Meyer
On 2/5/2010 5:15 AM, Suresh Kuna wrote: In the mysql prompt, execute the below use mysql ; select user from user ; will show all the accounts in a MySQL database. Alternatively, you can use myphpadmin. I guess it all depends upon what you need the information for and to what purpose. --

MySQL Proxy

2010-02-05 Thread Wagner Bianchi
Hi friends, Recently I accept an idea of testing a MySQL Proxy to concept an environment that will use two slave servers below it.Ok, the theory is good and I decide to try this, but, when I began to test step-by-step the MySQL Proxy manual I felt that somenthing was wrong. In first time, I start

where is the best material handler and cursor

2010-02-05 Thread MuraliKrishna
Hi I am in need to know about handlers and cursors.. if any site giving detailed explanation and examples on these. thanks in advance

MY SQL Slave Server

2010-02-05 Thread Vikram A
Dear Experts, I would like to configure the slave for my main server. My server is running in the FEDORA 11. I would like to make another mirror of the DB in the same server/ The copy of the DB can be kept at win server / another Fedora server. Can you suggest how to do the above? Thank you

Re: where is the best material handler and cursor

2010-02-05 Thread Jesper Wisborg Krogh
On 06/02/2010, at 5:31 PM, MuraliKrishna wrote: Hi I am in need to know about handlers and cursors.. if any site giving detailed explanation and examples on these. thanks in advance Cursors: http://dev.mysql.com/doc/refman/5.1/en/cursors.html Handlers: http://dev.mysql.com/doc/refman/5.1/en

Re: MY SQL Slave Server

2010-02-05 Thread Thiyaghu CK
Hi Vikram, So as my understanding you need to have a master slave setup in a single machine(FEDORA 11). 1. Make the already running mysql instance as Master 2. Install a new mysql in the same machine in different port which will be your slave 3. Replicate 4.You can also add more slave in same mac