2019年2月27日 星期三

[Android]_ch8.3_SQLite3資料庫語法介紹





[Android]_ch8.3_SQLite3資料庫語法介紹



C:\Gjun135>sqlite3 NCTU.db

SQLite version 3.8.6 2014-08-15 11:46:33

Enter ".help" for usage hints.

sqlite> CREATE TABLE student (id TEXT,name TEXT,phoneNO TEXT,addres

sqlite> .table

student

sqlite> .schema

CREATE TABLE student (id TEXT,name TEXT,phoneNO TEXT,address TEXT);

sqlite> INSERT INTO student VALUES('1','Derek','0912345678','Taipei

sqlite> INSERT INTO student VALUES('2','Merry','0912345678','Hsinch

sqlite> INSERT INTO student VALUES('3','Jerry','0912345678','Hsinch

sqlite> INSERT INTO student VALUES('4','Tom','0912345678','Taipei')

sqlite> INSERT INTO student VALUES('5','Vicky','0912345678','Taipei

sqlite> SELECT * FROM student;

1|Derek|0912345678|Taipei

2|Merry|0912345678|Hsinchu

3|Jerry|0912345678|Hsinchu

4|Tom|0912345678|Taipei

5|Vicky|0912345678|Taipei

sqlite> SELECT name,address FROM student;

Derek|Taipei

Merry|Hsinchu

Jerry|Hsinchu

Tom|Taipei

Vicky|Taipei

sqlite> SELECT name,address FROM student WHERE address='Taipei';

Derek|Taipei

Tom|Taipei

Vicky|Taipei

沒有留言:

張貼留言

Ether.fi Cash Card 一張所有人必備的加密貨幣信用卡   [Ether.fi Cash Card] : https://www.ether.fi/app/cash/sign-up?ref_code=d27f8523 ------國際交易所------ [Bitg...