473,320 Members | 1,949 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

CREATE TABLE with CHAR but get VARCHAR


Folks,

I'm using MySQL 3.23.56-Max and I have several CREATE TABLEs similar to the
following in structure (taken from my PHP script so ignore the double quotes
and periods)

"ID MEDIUMINT(10) NOT NULL AUTO_INCREMENT," .
"publisherHash CHAR(32) NOT NULL," .
"articleHash CHAR(32) NOT NULL UNIQUE," .
"issueID MEDIUMINT(10) NOT NULL," .
"articletext TEXT NOT NULL," .

I have examined the structure of my tables AFTER the create using DESCRIBE
or EXPLAIN and found that my columns that were CHAR(32) have been changed to
VARCHAR(32).

Why should this happen? Since my columns will be MD5 hashes and always be
32characters in length CHAR would be better, true? If so, will the usage of
VARCHAR likely lead to being a performance problem in the future?

all help is much appreciated,
thanks
randelld
Jul 19 '05 #1
0 1367

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Victor M | last post by:
Hello everyone. I'm running Oracle 8.0 on NT4 (yep thats right) and running SQL*Plus 8.03. I'm typing the following at the SQL*Plus prompt: 1. Create Table EMPLOYEES 2. ( 3. ...
2
by: Victor M. | last post by:
How would you setup a sample Create Table statement with having to specify a constraint name for a Primary Key in the table. Would it go something like this: Create Table EMPLOYEES (...
2
by: picaza | last post by:
hi, please correct my terminology if it is incorrect but i am trying to create a number of tables by writing an sql script/batch file and using the command: mysql -D myDB -u myname...
9
by: expect | last post by:
Hello, Trying to get this MySql create table command to work, no luck. create sequence serial; CREATE TABLE outbound ( source char(100) default '', destination char(100) default '', sport...
7
by: Genus Neduba | last post by:
Hi, is it actually possible to create a table that has a UDT as a column datatype? e.g.: CREATE TYPE addressType AS ( street INTEGER, zip VARCHAR(30)) MODE DB2SQL
1
by: Brian Tkatch | last post by:
We're going to expand a COLUMN from a lookup TABLE, which is REFERENCEd from three other TABLEs, from CHAR(2) to CHAR(5). It is the PK of the lookup. To do this, we plan to EXPORT the data, DROP...
3
by: zufie | last post by:
I want to use SQL code to Create a Table & Provide a Default Value for Each Column. Here is the code I am using: CREATE TABLE customer (First_Name char(50), Last_Name char(50), Address...
0
by: ramuygl | last post by:
want to create store procedure that. want to send the table name as argument and retrive the data of that argument. and want to store data in temperary table using the insert query. HERE I AM...
6
by: Alvin SIU | last post by:
Hi all, I have a table in Db2 v8 like this: Team Name Role ------ -------- --------------------- A Superman Leader A Batman Member A WonderWoman Member B ...
2
by: zufie | last post by:
I am learning SQL using MS Access until I get SQL Server. I am trying to create a table that includes time and date columns. I receive the error: Syntax error in field definition. Here is my...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.