SQlite笔记

admin 2015年7月29日11:00:30SQLite评论2,779 次浏览阅读模式

--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
我的微信
微信扫一扫
admin
  • 本文由 发表于 2015年7月29日11:00:30
  • 转载请务必保留本文链接:https://anyun.org/a/jishuguanzhu/database/sqlite/2015/0729/5752.html

发表评论

匿名网友 填写信息

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