Advertisement: Over 100,000 Jobs Worldwide. Click here to find one for you.

MySQL FAQs
FAQs Categories
Client Server Commands
Database Structure
Table Types or Storage Engines
Indexes
SQL Statements
Table Joins
Funtions and Operators
Tricky Select Queries
Speed Up Queries
Data Back Up
General Questions
Errors
Send This Page to Friend
Enter Friend's Email
Enter Your Email
http://www.kareerlinks.com/jobs/skill/MySQL
 

How to create memory table with hashed index?

Can you help me to explain, how to create Memory table with hashed index in MySQL?

Answer No: 188

MySQL provides USING clause which can be specified at table creation time to ask for hashed index on a particular column. The following example declares a hashed index on the username column:

CREATE TABLE users (
id SMALLINT UNSIGNED NOT NULL AUTO_INCREMENT,
username CHAR(15) NOT NULL,
pwd CHAR(15) NOT NULL,
INDEX USING HASH (username),
PRIMARY KEY(id)
) Engine=MEMORY;

Comments
Add Comments
Found a bug? Or do you have a better solution for this? Feel free to leave a message:
Leave a comment
Your Name: Your Email Address (optional):
Comment:


Related MySQL FAQs to the Above FAQ

When-should-we-use-memory-engine When should we use memory engine?

How-to-create-memory-table-with-btree-index How to create memory table with btree index?