Jump to content

[Guide]Errors during SQL queries and Solutions


Recommended Posts

Let's Start:

 

Error Code: 1064 - You have an error in your SQL syntax;

- Syntax error in query that is usually indicated where

 

Error Code: 1054 - Unknown column 'ххххх' in 'field list'

- Unknown column name in a query in the list of fields

- Compare fields in the query and the target table and correct the query

 

Error Code: 1050 - Table 'ххххх' already exists

- An attempt to create an existing table. The table in the database can of course

remove, but you should be aware of their actions. Suggestion -

before deleting the existing table - make backup!

 

Error Code: 1060 - Duplicate column name 'ххххх'

- Attempting to add an existing column. If you do update base

therefore, most likely in response to this request is not necessary

 

Error Code: 1146 - Table 'base_name.table_name' doesn't exist

- The table in the database with the name of such and such does not exist. You must create

empty table before completing this request.

 

Error Code: 1136 - Column count doesn't match value count at row 1

- Number of columns in the table does not match the number of variables

in the query. You can try to understand what a variable is missing or

superfluous in the request, comparing with existing data tables.

 

Error Code: 1062 - Duplicate entry 'ххххх' for key 1

- An attempt to record a pre-existing value in the key column. Change the value of

variable in the query. If you need to perform multiple queries on a

problem in different tables, you must write the same variable

wherever it exists in order to avoid the loss of links.

 

Error Code: 2006 - MySQL server has gone away

- When executing the request lost connection to SQL server. Error came across to me at

work SqlYog when creating a dump table (usually large) and follow

try to fill it. Solution - create a query with the structure of the table separately

and export the data tables in a separate file. Then create a table

first request, and import the data file.

 

Error Code: 1062 - Duplicate entry "Value" for key 1

- Change the value of another.

 

[Err] 1050 - Table 'ai_agents' already exists 
[Err] -- ---------------------------- 
-- Table structure for ai_agents 
-- ---------------------------- 
CREATE TABLE `ai_agents` ( 
`entry` int(11) unsigned NOT NULL DEFAULT '0', 
`type` smallint(5) unsigned NOT NULL DEFAULT '0', 
`event` int(11) unsigned NOT NULL DEFAULT '0', 
`chance` int(11) unsigned NOT NULL DEFAULT '0', 
`maxcount` int(11) unsigned NOT NULL DEFAULT '0', 
`spell` int(11) unsigned NOT NULL DEFAULT '0', 
`spelltype` int(11) unsigned NOT NULL DEFAULT '0', 
`targettype` int(11) unsigned NOT NULL DEFAULT '0', 
`cooldown` int(8) NOT NULL DEFAULT '0', 
`floatMisc1` float NOT NULL DEFAULT '0', 
`Misc2` int(11) unsigned NOT NULL DEFAULT '0', 
PRIMARY KEY (`entry`,`type`,`spell`), 
UNIQUE KEY `a` (`entry`,`spell`,`type`) 
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT='AI System'; 
[Msg] Finished - Unsuccessfully 

 

- delete the existing table and pour a new one.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...