Currency
I´m having some problems with currency´s fields. Actually I dont know what mysql´s field typeI have to choose..^ I wanna input this value: U$32.00 but, when I write the query: Select 'field' from table it returns.. '32' and not 32.00. Which select statement do i have to write? thanks
dates difference
I´d like to write a mysql statemant which takes two dates: for example:2003-11-10 2003-11-19 and results ...9 days something like :select 2003-11-19 - 2003-11-10 thanks
Round Question
I write this command: Select round(1.1) and obtain 1 as answer Is there a round command to obtain 2 as answer. I mean, in Excel this command is knwon as RoundUp! thanks a lot
curtime
When I write select curtime(); It´s return the mysql´s system time, but I would like to change this time (because it´s late 3 minutes) Any ideas? Thanks a lot
alter date
Hi there, Do you know a sql command which I can write to obtain the last date that I updated a table
date format
today´s date: 2003-07-01 Hi there,,, I wrote down this statement select (current_date - 1 ) and the result was: (Currentdate -1) --- 20030700 when i write select (current_date ) I have: (Currentdate) --- 2003-07-01 but actually, I wanna a result like that select (current_date - 1 ) as result (Currentdate -1) --- 2003-06-30 can you help me, please?
group by clause
hi there I wrote this querie : select pop, prot, sw_or_local, sum(qtd_porta) as soma from clientes where status'C' group by pop,prot,sw_or_local And I have this result : +++-++ | pop| prot | sw_or_local | sum | +++-++ |BHE | R2 | local50 | |BHE | R2 | local 12 | +++-++ . . . . . Have you see,? I would like something like that: | pop| prot | sw_or_local | sum | +++-++ |BHE | R2 | local62 Is my group by querie wrong...?
copying table
I tried to copy a table and got this mesagem, but I ´ve done this several times ago... Got error -1 from table handler
left join
Hi there... I have this situation: table_A table_B id name id name 1 A 1 A 2 B 2 B 3 C If i run this statement : SELECT table_A.* FROM table_A outer join table_B ON table_A.id=table_B.id WHERE table_B.id is null and I got: id name 3C But now i wanna use i join which i dont know, to results: idname 1 A 2 B I mean the rows which are exactly the same is there a fast type of join to make it?
left join
Which mysql´s version is able to make sub selects statament??? And left join? could you there give me some left join examples??? thanks a lot
Select between different hosts
Hi there, Anyone knows if is possible to make a Select command between 2 tables located in differents computers.. I wanna only one statament I mean.. I have the host named A, database dbA and table tbl_A... and I have the host named D, databse dbB and table tbl_B... I would like to write a comand like that: Select * from dbA.tbl_A, dbB.tbl_B where dbA.tbl_A.field=dbB.tbl_B.field thanks a lot
empty a table
Hi there, Im a new user Whats the statemant to empty a table... I mean I dont wanna delete one or two rows ...and not drop the table, i just wanna empty it... i tried something like: empty table, but it didnt work... thanks a lot
database copy
Hi there, I ´m using the Mysql control center with a database called dbONE in a PC, and I would like to copy it to another PC, Do you have any idea to how can I do it? I dont wanna create all the tables again... Thanks a lot
control center question
Hi there, I´m using control center 0.9.1-beta and when I started it, and write a sql command with a database already selected(green color), I always need to write first, the name of database which i´m using... like that: use dbteste; select * from.. Is there possible to use a databse by default? I mean, without write the command: use database; thanks a lot