Mapping MySqlDbType fields to MySQL keywords

Problem:

The MySQL.NET Connector has an enumeration called MySqlDbType which contains fields like Int16, Int32, Int64, Guid etc. Whilst I have not tested...something (gut feeling) tells me I cannot do this:

CREATE TABLE MyTable
(
    ID Guid NOT NULL, 
    Age Int32 NOT NULL
);

Question:

Does anyone know of a reference or list where each of the fields/values in MySqlDbType are mapped to their SQL keyword equivalent? Or shed some light on how I might specify column types using the enumeration when creating a table?

As a side note - some of these fields will use parameters, I will need knowledge of these too! i.e. VARCHAR(32) etc.

P.S. Sadly I am not a MySQL (or indeed SQL) expert!

Answers


You can make use of Numeric Data Types in MySQL like BIGINT, INT:

CREATE TABLE MyTable
(
    ID BIGINT NOT NULL, 
    Age INT NOT NULL
);

Need Your Help

Error serving CSS file via CloudFront, works fine directly from origin

ruby-on-rails heroku ruby-on-rails-3.2 amazon-cloudfront

I'm running a Rails 3.2 app on Heroku via the custom domain www.shmocket.com. I set up a CloudFront distribution with www.shmocket.com as the only origin. It's alternate domain name is cdn.shmocket...

What do I need for Travis-CI to decrypt secure variables on my fork?

encryption github continuous-integration travis-ci

I have forked a Github repository and would like to use travis-ci, as the original repository does, to run tests when I commit. However, the AWS keys, which are encrypted, are not decrypted and kee...

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.