Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7650171
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T11:11:00+00:00 2026-05-31T11:11:00+00:00

I am using MySQL Workbench to create a database. I have a table called

  • 0

I am using MySQL Workbench to create a database. I have a table called USERS defined as follows:

delimiter $$

CREATE TABLE `users` (
  `UID` int(10) unsigned NOT NULL AUTO_INCREMENT 
  `USERNAME` varchar(20) NOT NULL,
  `PASSWORD` varchar(64) NOT NULL
  PRIMARY KEY (`UID`),
  UNIQUE KEY `USER_NAME_UNIQUE` (`USERNAME`),
  KEY `USERS_ROLES_REF_IDX` (`USER_ROLE`),
  CONSTRAINT `USERS_ROLES_REF` FOREIGN KEY (`USER_ROLE`) REFERENCES `roles_ref` (`ROLE_NAME`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8$$

CREATE
DEFINER=`root`@`localhost`
TRIGGER `MyDB`.`users_after_ins_trig`
AFTER INSERT ON `MyDB`.`users`
FOR EACH ROW
begin
    insert into profiles (username) VALUES (new.username);
end
$$

When I go to forward engineer the database and create it, the script gives me the following error. As you can see from above, the username is part of the table. What gives?

Executing SQL script in server

ERROR: Error 1054: Unknown column 'username' in 'field list'

INSERT INTO `MyDB`.`USERS` (`UID`, `USERNAME`, `PASSWORD`) 
VALUES (NULL, 'user1', 'blahpassword')
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T11:11:02+00:00Added an answer on May 31, 2026 at 11:11 am

    Could it be that you are inserting into profiles from your trigger? I’m guessing profiles does not have a username column.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have created a MySQL database using MySQL Workbench. It has about 20 tables.
I'm using MySQL Workbench to model my database. In it, I have the option
I created this using MySQL WorkBench CREATE TABLE IF NOT EXISTS `bakasura_new`.`cities` ( `id`
I'm using MySQL Workbench to maintain the database schema for an application. The .mwb
(Using MySQL and PHP) I have a search form that will allow my users
I'm new to database design and am currently using MySQL Workbench to help me
I am using MySQL Workbench 5.2.28 for designing my database schema. I need to
I am developing a MySQL database using Workbench. I want two send two fields
Using MySQL Workbench 5.2.33 with MySQL 5.1.41 I have created an EER diagram. But
Using MySQL Workbench I reverse engineered phpbb's database to see what the schema would

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.