What is wrong with my SQL here 1089 - Incorrect prefix key

0 votes
CREATE TABLE `table`.`users` (
    `id` INT(11) NOT NULL AUTO_INCREMENT,
    `username` VARCHAR(50) NOT NULL,
    `password` VARCHAR(50) NOT NULL,
    `dir` VARCHAR(100) NOT NULL,
    PRIMARY KEY (`id`(11))
) ENGINE = MyISAM;

I'm getting the #1089 - Incorrect prefix key error and can't figure out what I'm doing wrong. 

Sep 3, 2022 in Database by Kithuzzz
• 38,010 points
838 views

No answer to this question. Be the first to respond.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.

Related Questions In Database

0 votes
1 answer

What is "with (nolock)" in SQL Server?

Using READ UNCOMMITED as a transaction isolation ...READ MORE

answered Feb 21, 2022 in Database by Neha
• 9,060 points
509 views
0 votes
0 answers

What is "with (nolock)" in SQL Server?

Can someone explain the ramifications of using ...READ MORE

Feb 22, 2022 in Database by Vaani
• 7,060 points
553 views
0 votes
1 answer

What is the candidate key in SQL Server?

A Candidate Key is any column or ...READ MORE

answered Feb 23, 2022 in Database by Neha
• 9,060 points
4,051 views
0 votes
1 answer

What is the SQL query to get the third highest salary of an employee from employee_table

You can try out something like this: SELECT ...READ MORE

answered Sep 27, 2018 in Database by Sahiti
• 6,370 points
12,055 views
0 votes
1 answer

What is subquery in SQL?

A subquery is a query inside another ...READ MORE

answered Oct 12, 2018 in Database by DataKing99
• 8,240 points
1,680 views
0 votes
1 answer

What is a Foreign key?

Foreign key maintains referential integrity by enforcing ...READ MORE

answered Oct 26, 2018 in Database by Sahiti
• 6,370 points
652 views
0 votes
1 answer
0 votes
1 answer

How to change the default value and to alter a column in sql?

Hi, You can try this: ALTER TABLE foobar_data CHANGE ...READ MORE

answered Jun 24, 2019 in Big Data Hadoop by Gitika
• 65,910 points
1,383 views
0 votes
1 answer

What is an index in SQL?

An index is used to speed up ...READ MORE

answered Feb 3, 2022 in Database by Vaani
• 7,060 points
520 views
0 votes
1 answer

Ordering by the order of values in a SQL IN() clause

Use MySQL's FIELD() function: SELECT name, description, ... FROM ... WHERE id ...READ MORE

answered Feb 4, 2022 in Database by Neha
• 9,060 points
4,788 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP