Home Database Mysql Tutorial 解析在MySQL里创建外键时ERROR 1005的解决办法_MySQL

解析在MySQL里创建外键时ERROR 1005的解决办法_MySQL

Jun 01, 2016 pm 01:24 PM
information

Mysql外键

bitsCN.com

在MySQL里创建外键时,提示错误,但只提示很简单的信息:ERROR 1005 (HY000): Can't create table 'db_qxztc.qx_userssssnew' (errno: 150)。根本起不到解决问题的作用。

要看错误的详细提示,可以使用命令:(在MySQL Manual里搜索“errno 150”时找到)

SHOW ENGINE INNODB STATUS;     //针对用INNODB存储方式的数据库

在信息中有一组【LATEST FOREIGN KEY ERROR】会有最近错误的详细描述和解决办法。
如:
111211 12:49:34 Error in foreign key constraint of table db_qxztc/qx_userssssnew
:
 foreign key(`SSSSID`) references`qx_SSSS`(`SSSSID`)):
Syntax error close to:
`qx_SSSS`(`SSSSID`))

提示在`qx_SSSS`(`SSSSID`)附近有语法错误,自己就应该仔细检查了,我在这里犯的错误就是references与它的参数间,少了空格。。

bitsCN.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

Repo: How To Revive Teammates
1 months ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
2 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island Adventure: How To Get Giant Seeds
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

How to remove author and last modified information in Microsoft Word How to remove author and last modified information in Microsoft Word Apr 15, 2023 am 11:43 AM

Microsoft Word documents contain some metadata when saved. These details are used for identification on the document, such as when it was created, who the author was, date modified, etc. It also has other information such as number of characters, number of words, number of paragraphs, and more. If you might want to remove the author or last modified information or any other information so that other people don't know the values, then there is a way. In this article, let’s see how to remove a document’s author and last modified information. Remove author and last modified information from Microsoft Word document Step 1 – Go to

How to get the GPU in Windows 11 and check the graphics card details How to get the GPU in Windows 11 and check the graphics card details Nov 07, 2023 am 11:21 AM

Using System Information Click Start and enter System Information. Just click on the program as shown in the image below. Here you can find most of the system information, and one thing you can find is graphics card information. In the System Information program, expand Components, and then click Show. Let the program gather all the necessary information and once it's ready, you can find the graphics card-specific name and other information on your system. Even if you have multiple graphics cards, you can find most content related to dedicated and integrated graphics cards connected to your computer from here. Using the Device Manager Windows 11 Just like most other versions of Windows, you can also find the graphics card on your computer from the Device Manager. Click Start and then

How to share contact details with NameDrop: How-to guide for iOS 17 How to share contact details with NameDrop: How-to guide for iOS 17 Sep 16, 2023 pm 06:09 PM

In iOS 17, there's a new AirDrop feature that lets you exchange contact information with someone by touching two iPhones. It's called NameDrop, and here's how it works. Instead of entering a new person's number to call or text them, NameDrop allows you to simply place your iPhone near their iPhone to exchange contact details so they have your number. Putting the two devices together will automatically pop up the contact sharing interface. Clicking on the pop-up will display a person's contact information and their contact poster (you can customize and edit your own photos, also a new feature of iOS17). This screen also includes the option to "Receive Only" or share your own contact information in response.

The single-view NeRF algorithm S^3-NeRF uses multi-illumination information to restore scene geometry and material information. The single-view NeRF algorithm S^3-NeRF uses multi-illumination information to restore scene geometry and material information. Apr 13, 2023 am 10:58 AM

Current image 3D reconstruction work usually uses a multi-view stereo reconstruction method (Multi-view Stereo) that captures the target scene from multiple viewpoints (multi-view) under constant natural lighting conditions. However, these methods usually assume Lambertian surfaces and have difficulty recovering high-frequency details. Another approach to scene reconstruction is to utilize images captured from a fixed viewpoint but with different point lights. Photometric Stereo methods, for example, take this setup and use its shading information to reconstruct the surface details of non-Lambertian objects. However, existing single-view methods usually use normal map or depth map to represent the visible

How NameDrop works on iPhone (and how to disable it) How NameDrop works on iPhone (and how to disable it) Nov 30, 2023 am 11:53 AM

In iOS17, there is a new AirDrop feature that allows you to exchange contact information with someone by touching two iPhones at the same time. It's called NameDrop, and here's how it actually works. NameDrop eliminates the need to enter a new person's number to call or text them so they have your number, you can simply hold your iPhone close to their iPhone to exchange contact information. Putting the two devices together will automatically pop up the contact sharing interface. Clicking on the popup will display a person's contact information and their contact poster (a photo of your own that you can customize and edit, also new to iOS 17). This screen also includes "Receive Only" or share your own contact information in response

What's the reason for the delay in receiving messages on WeChat? What's the reason for the delay in receiving messages on WeChat? Sep 19, 2023 pm 03:02 PM

The reason for the delay in WeChat receiving information may be network problems, server load, version problems, device problems, message sending problems or other factors. Detailed introduction: 1. Network problems. The delay in receiving information on WeChat may be related to the network connection. If the network connection is unstable or the signal is weak, it may cause delays in information transmission. Please ensure that the mobile phone is connected to a stable network and the network signal strength is good. ; 2. Server load. When the WeChat server load is high, it may cause delays in information transmission, especially during busy periods or when a large number of users use WeChat at the same time, etc.

What is the unit for transmitting information in a computer network? What is the unit for transmitting information in a computer network? Dec 07, 2020 pm 05:26 PM

The transmission of information in computer networks is based on "words"; words are the basic unit of data transmission. Computer networks have two main functions: data communication and resource sharing, and the information transmitted in data communication is expressed in the form of binary data. Data communication is a communication method and communication service that uses data transmission technology to transfer data information between two terminals according to a certain communication protocol.

iOS 17 NameDrop: How to Easily Share Your Contact Information on iPhone iOS 17 NameDrop: How to Easily Share Your Contact Information on iPhone Jul 30, 2023 pm 05:18 PM

Apple has introduced a very fast (if not the fastest) way to share your contact information with another iPhone via NameDrop. Here's everything you need to know. What is NameDrop? iOS 17 introduces NameDrop, a revolutionary feature that leverages contact posters. These personalized cards can be created for yourself and other contacts and will appear whenever you make a call. With multiple customizable options such as photos, Memojis, monograms, and more, you can tailor your contact poster to match your personality using your preferred color scheme and fonts. NameDrop automatically shares your poster when your iPhone is in close proximity to other users, allowing both parties to effortlessly

See all articles