om: Scott Noyes [mailto:[EMAIL PROTECTED]
Sent: 11 August 2005 15:39
To: Ben Smith
Cc: mysql@lists.mysql.com
Subject: Re: HELP! sql command question for mysql
> It appears that you don't need to
> specify in the Group By clause all the columns that are referenced
> without an agg
Scott Noyes wrote:
It appears that you don't need to
specify in the Group By clause all the columns that are referenced without
an aggregate function
True.
For example this query would be invalid in MSSQL but
valid in MySQL:
select id, vendor, sum(price)
from p
group by id
In this cas
> It appears that you don't need to
> specify in the Group By clause all the columns that are referenced without
> an aggregate function
True.
> For example this query would be invalid in MSSQL but
> valid in MySQL:
>
> select id, vendor, sum(price)
> from p
> group by id
In this case, `vendor
id, vendor
Each query giving a different result.
Regards
Ben.
-Original Message-
From: Gleb Paharenko [mailto:[EMAIL PROTECTED]
Sent: 10 August 2005 23:29
To: mysql@lists.mysql.com
Subject: Re: HELP! sql command question for mysql
Hello.
I'm not sure about the speed of this quer
Hello.
I'm not sure about the speed of this query, but it seems to work:
mysql> source g.sql
+---+---++
| id| price | vendor |
+---+---++
| OG012 |20 | b |
| OG013 |40 | c |
+---+---++
[EMAIL PROTECTED] mysql-deb
Hello there,
first of all, my english isn't good, hope you understand what I mean.
I have a table name "p" like that:
mysql> select * from p;
+---+---++
| id| price | vendor |
+---+---++
| OG012 |40 | a |
| OG012 |20 | b |
| OG012 |20 | c
>currently, to list the last 100 records in a table I use this sql command:
>
>select * from test order by T desc limit 100;
>Note: "T" is the name of a field in my table "test" .
>
>can I instead use record number or use the count function to get the
>same result?
MySQL doesn't really have the
currently, to list the last 100 records in a table I use this sql command:
select * from test order by T desc limit 100;
Note: "T" is the name of a field in my table "test" .
can I instead use record number or use the count function to get the same
result?
I don't have an index field in my tab