当前位置:网站首页>Common problems of database
Common problems of database
2022-07-18 22:36:00 【Star and Dream Star_ dream】
Catalog
problem 2:Duplicate entry 't07027' for key 'teacher.PRIMARY'
problem 3:mysqldump Command backup problem
problem 1:ambiguous
Column 'S_no' in where clause is ambiguous
terms of settlement :
WHERE student.S_no Add the table name before the attribute to solve !
problem 2:Duplicate entry 't07027' for key 'teacher.PRIMARY'
When creating views , Try to add new information , Report errors !
Duplicate entry 't07027' for key 'teacher.PRIMARY'
terms of settlement :
Delete the original view , And re create a new view .
Knowledge points supplement : The view is a virtual table , A table derived from one or more tables in a database
Let's take a look v_teach How views are created :
CREATE VIEW v_teach AS SELECT t_no,T_name,major,prof,Department FROM teacher WHERE t_no = 1;Create the view above SQL We can see clearly in the sentence where t_no = 1; Because a view is a result set of a query statement , So we need to delete this view , Create a new one with the same name (v_teach) The view of .
Change the view as follows :
CREATE VIEW v_teach AS SELECT t_no,T_name,major,prof,Department FROM teacher WHERE Department = ' school of computing ';Now continue to execute the above code
INSERT INTO v_teach VALUES('t07027',' Thank God ',' pedagogy ',' associate professor ',' school of computing ');Successfully solved !
expand : In the view , We can see that a message has been inserted , Go back to the table you actually created (teacher) in , We can also see that this message has also been inserted .
problem 3:mysqldump Command backup problem
The use of SQL sentence
mysqldump -u root -p _xscj > D:\ Study \ Backup
terms of settlement :
Enter the correct SQL sentence :
mysqldump -u root -p _xscj > D:\ Study \ Backup \test.sqlBe careful : Be sure to add .sql suffix , Otherwise access will be denied !
![]()
Successfully solved !
边栏推荐
- 如何在自动化测试中使用MitmProxy获取数据返回
- Huawei od JS splicing URL
- Lingo solves the maximum (small) value of piecewise function
- [UCOS III source code analysis] - wait for multiple kernel objects
- KDD 2017 | metapath2vec:异质图的可扩展表示学习
- Accessing local variables in anonymous inner classes
- Domestic light! High score spatiotemporal representation learning model uniformer
- Product of JS primes in Huawei computer test
- pA是什么?构建病毒的结构元件,polyA,一段重复的碱基序列
- What about the update error of win11 preview? Solutions to the failure of win11 preview installation
猜你喜欢

毕业季--数据库常见面试题

Open source ten questions, a quick start guide for community newcomers

狂神redis笔记01

数据库常遇到的问题
![[sequential reading and writing of data files in C language]](/img/b0/13b57edfbcb7a1aa728811eaa0c9bd.png)
[sequential reading and writing of data files in C language]

How to solve the problem of 8080 port being occupied? Win11 8080 port occupied solution

What kind of wireless Bluetooth headset is good? Bluetooth headset with the best comprehensive performance

Leetcode 1342. Number of operations to change the number to 0

Vs2017\vs2019\vs2022 project redundant files (intermediate files \ temporary files) one click clean bat

C语言几种特殊标准定义和用法
随机推荐
Win11录屏怎么录声音?Win11录屏幕视频带声音的方法
Deep understanding of C language pointer and array
Three sides of headlines + four sides of Alibaba + five sides of Tencent took the offer to share the summary, and finally joined Alibaba
Cmu15445 (fall 2019) project 4 - logging & Recovery details
【部署】Redis
Developers share the initial experience of tinyms, a high-level API tool of mindspire!
Gym报错 The observation returned by the `reset()` method is not contained with the .......
MySQL 5.7.37 database download and installation tutorial (no installation required for Windows)
PHP 内存溢出 ?如何解决呢 ?
Open source ten questions, a quick start guide for community newcomers
毕业季--数据库常见面试题
Alicloud3 build WordPress
第3章业务功能开发(查看市场活动明细)
Product of JS primes in Huawei computer test
CMU15445 (Fall 2019) 之 Project#4 - Logging & Recovery 详解
new操作符具体做了什么,面试
Which brand of Bluetooth headset has good noise reduction? Top 10 active noise reduction headphones
创新中心首发!恭喜佳华物链云获MindSpore认证!
Web crawler technology creates its own Youdao dictionary
TCP congestion control details | 6 Active queue management





