时间:2021-07-01 10:21:17 帮助过:3人阅读
update t_book set book_name=‘newBook‘ where book_count=12
select book_count ,book_id from t_book where book_name
select * from t_book where book_name
select * from t_book
drop table if exists t_class
create table if not exists t_class(class_id integer primary key autoincrement,class_name varchar,person_count,integer default 3)
select class_id,person_count from t_class where class_id=7 or class_id=8
select class_id,person_count from t_class where class_id=7 and person_count=20
select class_id,person_count from t_class where class_id between 7 and 8
select count( 0 )from t_class
//排序
select * from t_newBook order by newBook_count desc
//最大小值平均值
select min( person_count )from t_class
select max( person_count )from t_class
select avg( person_count )from t_class
select sum( person_count )from t_class
select abs( person_count )from t_class
//四舍五入
select round( person_count )from t_class
//别名
select max( person_count) name from t_class
select replace( class_name,‘a‘,‘o‘)from t_class
//除去空格select trim( class_name)from t_class
//长度
select length ( class_name)from t_class
//时间只有日期
select date () from t_class
//时间是系统时间
select datetime() from t_class
select * from t_class where class_name is null
SQL语句
标签: