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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T00:44:02+00:00 2026-06-03T00:44:02+00:00

i have small problem with inserting data into my table events +——-+———-+——+—–+———+—————-+ | Field

  • 0

i have small problem with inserting data into my table “events”

 +-------+----------+------+-----+---------+----------------+
 | Field | Type     | Null | Key | Default | Extra          |
 +-------+----------+------+-----+---------+----------------+
 | id    | int(11)  | NO   | PRI | NULL    | auto_increment |
 | name  | longtext | YES  |     | NULL    |                |
 +-------+----------+------+-----+---------+----------------+

from my view old_data:

+-------+------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+-------+------+------+-----+---------+-------+
| event | text | YES  |     | NULL    |       |
+-------+------+------+-----+---------+-------+

I want to insert data from field “event” from view old_data into “name” field in table “events” to do this i was trying to use commands:

 insert into 'events' ('name') select 'event' from 'old_data'
 insert into 'events' ('name') select 'event' from 'old_data' group by 'event';

etc etc. Every time it’s syntax error. WHY?!

  • 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-03T00:44:03+00:00Added an answer on June 3, 2026 at 12:44 am

    Your use of apostrophe delimiters around your identifiers is incorrect (they are for delimiting strings). Try:

    INSERT INTO events (name) SELECT event FROM old_data;
    

    If you want to use delimiters around identifiers, you should use backtick (`):

    INSERT INTO `events` (`name`) SELECT `event` FROM `old_data`;
    

    From the MySQL manual:

    The identifier quote character is the backtick (“`”):

    mysql> SELECT * FROM `select` WHERE `select`.id > 100;
    

    If the ANSI_QUOTES SQL mode is enabled, it is also permissible to quote identifiers within double quotation marks:

    mysql> CREATE TABLE "test" (col INT);
    ERROR 1064: You have an error in your SQL syntax...
    mysql> SET sql_mode='ANSI_QUOTES';
    mysql> CREATE TABLE "test" (col INT);
    Query OK, 0 rows affected (0.00 sec)
    

    The ANSI_QUOTES mode causes the server to interpret double-quoted strings as identifiers. Consequently, when this mode is enabled, string literals must be enclosed within single quotation marks. They cannot be enclosed within double quotation marks. The server SQL mode is controlled as described in Section 5.1.6, “Server SQL Modes”.

    Identifier quote characters can be included within an identifier if you quote the identifier. If the character to be included within the identifier is the same as that used to quote the identifier itself, then you need to double the character. The following statement creates a table named a`b that contains a column named c"d:

    mysql> CREATE TABLE `a``b` (`c"d` INT);
    

    In the select list of a query, a quoted column alias can be specified using identifier or string quoting characters:

    mysql> SELECT 1 AS `one`, 2 AS 'two';
    +-----+-----+
    | one | two |
    +-----+-----+
    |   1 |   2 |
    +-----+-----+
    

    Elsewhere in the statement, quoted references to the alias must use identifier quoting or the reference is treated as a string literal.

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

Sidebar

Related Questions

I have a small problem. I am creating an appointment table where in the
i have small problem i.e. their is one celltable with lot of data it
I have encountered a problem while inserting a large amounts of text into my
have small problem, and would very much appreciate help :) I should convert byte
I have a small problem with Smarty... I have two different template files in
I have a small problem where I want to find the next active item
i have a small problem, i am creating a edit page in my asp.net
I have a small problem with a SWT.Browser widget who throws a quite puzzling
I have a small problem... There are hundreds of images in a folder. they
I have a small problem with UINavigationController animation between two view. My application build

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.