Does anyone know what Column Type the result of the Year() function is?
In other words, if I execute:
select Year(Hiredate) as mycolname from mytable;
is the result a smallint? a char()? a varchar()?
Unfortunately, the manual doesn't say and I can't think of a quick way to figure it out....
Seems to be bigint(4), according to this rather quick way:
mysql> \utest;create table y select year(now());show create table y; Database changed Query OK, 1 row affected (0.03 sec) Records: 1 Duplicates: 0 Warnings: 0
+-------+-------------------------------------------------------------------------+
| Table | Create Table |
+-------+-------------------------------------------------------------------------+
| y | CREATE TABLE `y` (
`year(now())` bigint(4) default NULL
) TYPE=MyISAM |
+-------+-------------------------------------------------------------------------+
1 row in set (0.02 sec)
-- Roger
-- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]