SQlite笔记

  • A+
所属分类:SQLite

--select  (sqlite_version());版本号 获取

--select count(*) from sqlite_master WHERE type = "table";  获取数据库数量

--create table student(name varchar(10), age smallint);

/*use test

CREATE TABLE hero

(

    hero_id   INT          NOT NULL PRIMARY KEY,

    hero_name NVARCHAR(10) NOT NULL

);*/

--select  length(name) from sqlite_master WHERE type = "table" and name not in ('student') limit 0,1; 获取表名长度

  --pragma table_info ('hero'); 获取字段信息

  

  --select sql from sqlite_master where tbl_name='hero

--select * from sqlite_master where tbl_name="hero" ?--and?sql?like?'%,ADDRESS%';  sql存储了字段信息

--insert into hero(hero_id,hero_name) values ('2','jion')

select * from hero

  • 我的微信
  • 这是我的微信扫一扫
  • weinxin
  • 我的微信公众号
  • 我的微信公众号扫一扫
  • weinxin

发表评论

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen: