cmd 下sql语句及结果
Microsoft Windows [版本 10.0.14393]
(c) 2016 Microsoft Corporation。保留所有权利。
C:\Users\李长青>mysql -uroot -h127.0.0.1 -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 164
Server version: 5.6.17 MySQL Community Server (GPL)
Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> use calls1
Database changed
mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| calls1 |
| mysql |
| performance_schema |
| test |
+--------------------+
5 rows in set (0.00 sec)
mysql> use calls1
Database changed
mysql> select * from user;
+----+--------+-----+-----+--------+-----+
| id | name | pwd | sex | class1 | tel |
+----+--------+-----+-----+--------+-----+
| 3 | | | | | |
| 54 | 李长青 | 123 | 男 | 应用 | 521 |
| 53 | | | | | |
+----+--------+-----+-----+--------+-----+
3 rows in set (0.00 sec)
mysql> describe user ;
+--------+------------------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
+--------+------------------+------+-----+---------+----------------+
| id | int(11) unsigned | NO | PRI | NULL | auto_increment |
| name | varchar(50) | NO | | NULL | |
| pwd | varchar(50) | NO | | NULL | |
| sex | varchar(10) | NO | | NULL | |
| class1 | varchar(50) | NO | | NULL | |
| tel | varchar(50) | NO | | NULL | |
+--------+------------------+------+-----+---------+----------------+
6 rows in set (0.00 sec)
mysql> delete from user where id"3";
ERROR 1064 (42000): 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 '"3"' at line 1
mysql> delete from user where id='3';
Query OK, 1 row affected (0.00 sec)
mysql> use calls1
Database changed
mysql> create table user001(
-> id int auto_increment primary key,
-> user varchar(50) not null,
-> pwd varchar(50) not null,
-> createtime datetime);
Query OK, 0 rows affected (0.27 sec)
mysql> use user001
ERROR 1049 (42000): Unknown database 'user001'
mysql> describe user001;
+------------+-------------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
+------------+-------------+------+-----+---------+----------------+
| id | int(11) | NO | PRI | NULL | auto_increment |
| user | varchar(50) | NO | | NULL | |
| pwd | varchar(50) | NO | | NULL | |
| createtime | datetime | YES | | NULL | |
+------------+-------------+------+-----+---------+----------------+
4 rows in set (0.00 sec)
mysql>
cmd 下sql语句及结果的更多相关文章
- mysql下sql语句 update 字段=字段+字符串
mysql下sql语句 update 字段=字段+字符串 mysql下sql语句令某字段值等于原值加上一个字符串 update 表明 SET 字段= 'feifei' || 字段; (postgr ...
- SQLCMD的用法,使用CMD 执行sql语句
SQLCMD的用法,使用CMD 执行sql语句 SQLCMD 允许在Windows命令窗中通过命令行提示符运行脚本. 语法如下: sqlcmd [ { { -U <login id> ...
- 技术分析 | 浅谈在MySQL体系下SQL语句是如何在系统中执行的及可能遇到的问题
欢迎来到 GreatSQL社区分享的MySQL技术文章,如有疑问或想学习的内容,可以在下方评论区留言,看到后会进行解答 SQL语句大家并不陌生,但某种程度上来看,我们只是知道了这条语句是什么功能,它可 ...
- cmd执行SQL语句
首先新建txt文本,复制粘帖以下内容,保存为cmd执行SQL.bat.注意是bat文件 osql -S 服务器名称 -d 数据库 -U 登录名 -P 密码 -i 盘符:\文件夹\文件.sql
- EF6.0 下sql语句自动生成的参数类型decimal(18,2)修改
很多时候我们需要对插入到数据库的数据的精度做一个控制,例如sql server下保留6位小数使用numeric(10,6) .而到c#里对应的数据类型就是decimal ,但是使用EF6.0的crea ...
- mysql下sql语句令某字段值等于原值加上一个字符串
MYSQL在一个字段值后面加字符串,如下: member 表名 card 字段名 update member SET card = '00' || card; (postgreSQL 用 || 来连贯 ...
- SQL语句操作数据与一些函数使用的丰富数据库
数据库有多重要,其实不用我说,但该怎么运用好数据库下SQL语句与其它的如“函数”等等,那就需要我们大家多多去练习并总结其中的窍门,或许你的总结没那么好,担只要你的练习足够多,就算那不是窍门,那也将是你 ...
- 登录测试用例sql语句注入
利用SQL注入漏洞登录后台的实现方法 作者: 字体:[增加 减小] 类型:转载 时间:2012-01-12我要评论 工作需要,得好好补习下关于WEB安全方面的相关知识,故撰此文,权当总结,别无它意.读 ...
- MySQL5.6 大量SQL语句处于Writing to net状态的案例分析
[问题现象] 开发同事反馈有应用在21:00-22:00之间出现大量超时报错. [问题分析] 1. 从DB服务器慢查询指标来看,18:00后有大量的慢查询,累计产生了约9000条慢查询 2. 测试直接 ...
随机推荐
- vscode自己常用的快捷键
(1)快速复制一行 ctrl + alt +
- leetcode--js--Longest Substring Without Repeating Characters
问题描述: Given a string, find the length of the longest substring without repeating characters. Example ...
- 与WinRT组件进行操作
1,原理: WinRT是一个新的类库,应用程序可以用它访问操作系统的功能. 在内部,WinRT以组件的形式实现.COM Component Object Model- WinRT使用.net元数据来描 ...
- java工作流系统jflow表单引擎字段扩展组件介绍
关键词:工作流快速开发平台 工作流流设计 业务流程管理 asp.net 开源工作流 bpm工作流系统 java工作流主流框架 自定义工作流引擎 表单设计器 流程设计器 装饰类图片 用于 ...
- 这 100 道 Python 题,拿去刷!!!
2020年,学 Python 还有价值吗? 根据 2020 年 2 月的 TIOBE 编程语言排行榜显示,Python仍然稳居第三位. 此排行榜排名基于互联网上有经验的程序员. 课程和第三方厂商的数量 ...
- P2918 [USACO08NOV]买干草Buying Hay
链接:Miku ---------------- 这就是一个完全背包的板子题 ---------------- 我们把重量当作重量,开销当作价值,那么这个题就是个求价值最小的完全背包 然而题目上说了是 ...
- PHP0016:PHP http协议
post提交请求头
- C# WPF之Material Design自定义颜色
微信公众号:Dotnet9,网站:Dotnet9,问题或建议:请网站留言, 如果对您有所帮助:欢迎赞赏. C# WPF之Material Design自定义颜色 阅读导航 本文背景 代码实现 本文参考 ...
- eclipse maven jdk1.8 还原站点项目红感叹号总是小结
问题背景有三 maven 默认是jdk1.5jdk1.8 目录文件夹不全操作: 在项目上右击-> build path-->config build path-->libraries ...
- sbt package报错:a bytes-like object is required, not 'str'
Traceback (most recent call last): File , in <module> s.sendall(content) TypeError: a bytes-li ...