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 …