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
N.M.P.L. Company www.NearMePayday.Loan || 3-month (90 days)
Powered by 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;

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?

About FAQs: Recently Added FAQs

About MySQL FAQs: Site Map | Bookmark Us | Recommend this Site to Your Friend | Contact Us

Useful Links: Wikipedia.org | Oracle.com | w3schools.com | www.php.net | Github.com

© 2021  www.mysqlfaqs.net
All rights reserved.