Re: problem trying to create table with pound sign default
Posted by: Michael Phoenix
Date: November 10, 2009 04:40PM

CAn somebody please give me an idea of what I am doing wrong here? I coan't even put the utf8 pound sign into my table. Here's my SQL. I'm really amazed that there is so little information on how to insert utf8 characters into a table.

CREATE DATABASE `pricinguk`;

USE pricinguk;

SET NAMES utf8;

CREATE TABLE `clients` (
`Name` varchar(50) NOT NULL,
PRIMARY KEY (`Name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

INSERT INTO `clients` VALUES ('Default');

CREATE TABLE `sourcelang` (
`Language` varchar(20) NOT NULL,
PRIMARY KEY (`Language`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

INSERT INTO `sourcelang` VALUES ('English');

CREATE TABLE `targetlang` (
`Language` varchar(20) NOT NULL,
PRIMARY KEY (`Language`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

INSERT INTO `targetlang` VALUES ('French');

CREATE TABLE `pricing` (
`Client` varchar(50) NOT NULL,
`SrcLang` varchar(20) NOT NULL,
`TgtLang` varchar(20) NOT NULL,
`ProjectType` varchar(20) NOT NULL,
`hourly` bigint(20) DEFAULT NULL,
`perWordRate` bigint(20) DEFAULT NULL,
`perMinute` bigint(20) DEFAULT NULL,
`perMatchWordRate` bigint(20) DEFAULT NULL,
`perPartialWordRate` bigint(20) DEFAULT NULL,
`perRepeatWordRate` bigint(20) DEFAULT NULL,
`Currency` char(2),
PRIMARY KEY (`Client`,`SrcLang`,`TgtLang`, `ProjectType`),
CONSTRAINT `pricing_ibfk_1` FOREIGN KEY (`Client`) REFERENCES `clients` (`Name`) ON DELETE CASCADE,
CONSTRAINT `pricing_ibfk_2` FOREIGN KEY (`SrcLang`) REFERENCES `sourcelang` (`Language`) ON DELETE CASCADE,
CONSTRAINT `pricing_ibfk_3` FOREIGN KEY (`TgtLang`) REFERENCES `targetlang` (`Language`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

INSERT INTO `pricing` VALUES ('Default', 'English', 'French', 'Translation', 0, 0, 0, 0, 0, 0, 0x00A3);

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: problem trying to create table with pound sign default
3504
November 10, 2009 04:40PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.