mysql-5.0

Quick SQL Question: SQLzoo tutorial problem

Problem 2b goes as follows: 2b. For each subject show the first year that the prize was awarded. nobel(yr, subject, winner) My solution was this: SELECT DISTINCT subject, yr FROM nobel ORDER BY yr ASC; Why isn't this working? ...

SQL tutorial question: Listing the first value from a three-way joined table query

Ugh ok I'm terrible at explaining things, so I'll just give you the quotes and links first: Problem 4b (near bottom): 4b. List the film title and the leading actor for all of 'Julie Andrews' films. movie(id, title, yr, score, votes, director) actor(id, name) casting(movieid, actorid, ord) (Note: movie.id = cast...

MySql FLOAT datatype and problems with more then 7 digit scale

We are using MySql 5.0 on Ubuntu 9.04. The full version is: 5.0.75-0ubuntu10 I created a test database. and a test table in it. I see the following output from an insert statement: mysql> CREATE TABLE test (floaty FLOAT(8,2)) engine=InnoDb; Query OK, 0 rows affected (0.02 sec) mysql> insert into test value(858147.11); Query OK, 1 row ...

Proper syntax for MySQL 5.0.x FEDERATED table creation?

So I'm trying to create a federated table using the syntax from the docs. Following this, I've created a table like so: CREATE TABLE `federated_table` ( `table_uid` int(10) unsigned not null auto_increment, ..., PRIMARY KEY (`table_uid`) ) ENGINE=FEDERATED DEFAULT CHARSET=latin1 CONNECTION='mysql://user:[email protected]:3306/';...

What is the best way to store a URL value using MySQL?

I was thinking of storing URL values in my database but I know some URL's sometimes get ridiculously long. I think my MySQL Database is Version 5.0. I was thinking of using. VARCHAR(255) but this will only work for so long. So should I use. TEXT ...