473,503 Members | 1,818 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1381

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

Similar topics

2
4569
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
6357
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
1603
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
6749
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
5263
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
1731
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
25732
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
1907
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
4296
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
10488
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
7086
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7280
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7330
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
5014
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4672
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3167
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3154
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
736
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
380
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.