new Database 新建数据库
new Table 新建表
utf-8 编码格式
primary key 主键:特点:在表中是唯一的不可重复的,一般都是学号,编号
auto increment 自增,一般都把主键设置为自增
allow null 允许为空,但是注意,主键不可勾选,主键不能为空!
not nuill 不允许为空整形 int 默认为1位,需要设置长度
字符串 varchar 默认一个字节长度,所也要设置长度;一个汉字2-3个字节像身份证号码或者手机号,但是一般都有varchar字符串存储
sql 命令
1,创建数据库
create database 数据库名称;
执行成功:Query OK,1 row affected
2,选择操作的数据库
use 数据库名称;
执行成功:Database changed
3.创建表
create table 表名(字段1 字段类型(长度) 修饰 primary key auto_increament not null,字段2 类型(长度) 修饰,字段3 类型(长度) 修饰......);
执行成功:Query OK,0 row affected
4.查看数据库中所有的表
show tables;
5.查看所有的数据库
show databases;数据层
6,增加数据
insert into 表名(字段1,字段2,字段3,...) values (值1,值2,值3,...);7,删除语句
delete from 表名 where 条件(id=x;name="x"...);8,更新语句
update 表名 set 字段1=值1,字段2=值2... where 条件();
`` 字段=值:age=7,type="戴迪" 条件:id=4,type="泰迪"9,查询语句
select * from 表名;
按条件查询
select * from 表名 where 条件;
查询某列
select 列名1,列名2... from 表名;
c语言中将整数转换成字符串Given an ASCII string (char[]) and we have to convert it into octal string (char[]) in C. 给定一个ASCII字符串(char []),我们必须在C中将其转换为八进制字符串(char [])。 Logic: 逻辑: To convert an ASCII string t…
c语言中数组越界怎么办Let’s understand first, what is index out of bounds? 首先让我们了解一下 , 什么是索引超出范围? Let suppose you have an array with 5 elements then the array indexing will be from 0 to 4 i.e. we can access element…
c#委托调用另一窗口函数Prerequisite: Delegates in C# 先决条件: C#中的代表 We can also call a member function of a class using delegates. It is similar to static function calls, here we have to pass member function using an object on t…
python 日本就业Read basics of the drawing/image processing in python: Drawing flag of Thailand 阅读python中绘图/图像处理的基础知识: 泰国的绘图标志 The national flag of Japan is a rectangular white banner bearing a crimson-red disc at its center…
Scala | 多行字符串到数组 (Scala | Multiline strings to an array) Scala programming language is employed in working with data logs and their manipulation. Data logs are entered into the code as a single string which might contain multiple lines of code and …