On Thu, 24 Feb 2005 16:11:51 +0100, "LM" <nospam@nospam.no> wrote:
>Jeg køre med 4.1.10. Kan jeg ikke sætte det som standard, så det gælder alle
>tabeller?
Du kan i din my.cnf fx sætte:
default-collation = latin1_danish_ci
collation-server = latin1_danish_ci
Når du har sat det, skal du dog nok rebuild'e evt. indexes.
Ellers kan du fx prøve:
CREATE TABLE `languages` (
`danish` tinytext collate latin1_danish_ci,
`swedish` tinytext character set latin1,
`german` tinytext character set latin1 collate latin1_german1_ci,
`spanish` tinytext character set latin1 collate latin1_spanish_ci
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_danish_ci;
INSERT INTO `languages` VALUES
('c','c','c','c'),('æ','æ','æ','æ'),('b','b','b','b'),('ø','ø','ø','ø'),('a','a','a','a'),('å','å','å','å'),('ö','ö','ö','ö'),('h','h','h','h');
... og derefter prøve følgende:
SELECT * FROM languages ORDER BY danish;
SELECT * FROM languages ORDER BY swedish;
SELECT * FROM languages ORDER BY german;
SELECT * FROM languages ORDER BY spanish;
--
- Peter Brodersen
|