[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
can i do this with sql?
Hi all,
I have a table like this:
id data year
1 2 01
2 2 01
6 2 01
7 2 01
8 2 01
11 2 01
What i want to be able to get is these results from an sql query (given that
i want id's 1-9):
id data year
1 2 01
2 2 01
3 0 0
4 0 0
5 0 0
6 2 01
7 2 01
8 2 01
9 0 0
Basically it has made up the rows with id's 3,4, 5 and 9 because they didnt
exist in the table.
Can anybody give me any clues how to achieve this?
Thanks,
Jamie Burns.
---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <mysql-thread92341@xxxxxxxxxxxxxxx>
To unsubscribe, e-mail <mysql-unsubscribe-treed=ultraviolet.org@xxxxxxxxxxxxxxx>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
This mailing list archive is a service of Copilot Consulting.