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 8157557
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T17:19:32+00:00 2026-06-06T17:19:32+00:00

This is my SQL Script CREATE TABLE account_profile ( accnt_id int NOT NULL ,

  • 0

This is my SQL Script

CREATE TABLE account_profile
(
accnt_id int NOT NULL ,
first_name varchar(255),
last_name varchar(255),
biography varchar(255),
date_joined DATE,
country varchar(255),
gender varchar(255),
screename varchar(255),
path varchar(255),
FOREIGN KEY (accnt_id) REFERENCES accounts(id)
)

it kept giving me this error
SQL query:

CREATE TABLE ac

MySQL said:

#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1 

What does this specifically mean? what should I do? from my point of view the script is quite okay,I just can’t pin point where’s the error

  • 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-06-06T17:19:34+00:00Added an answer on June 6, 2026 at 5:19 pm

    Make sure you’re using the InnoDB engine. The other engines do not support foreign keys.

    CREATE TABLE account_profile
    (
    ...
    ) ENGINE = INNODB;
    

    Also check if the column account_profile.accnt_id matches the data type of accounts.id exactly. The second column should have an index defined on it (a primary key will do.)

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

Sidebar

Related Questions

For example, say I have this SQL Script: create table Person ( id int
I'm trying to run this SQL script but it's not working. It says there
I have several *.sql files with script to create table and sprocs for a
I ran following sql script on my database: create table cities ( id serial
I'm currently trying to load a sql script to create a HSQL database. This
Here's some sample code: if object_id('tempdb..#TempList') is not null drop table #TempList create table
This sql script gives me error at the VARCHAR and EXIT; . I try
I want to merge a sql script which create a table and a pl/sql
I have a script task that executes a dynamically created SQL restore statement. This
I have this sql script DECLARE @XmlStr XML SET @XmlStr = '<EmployeeID> <Employee>48f9194f-8d46-e111-8849-0050569445f1</Employee> <Employee>7d725561-8d46-e111-8849-0050569445f2</Employee>

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.