sql培训

1.select--查询语句

select * from table;

select cols from table;

select cols from table where condition;

1.1SQL通配符

%:匹配任意多个字符

_:匹配任意一个字符

[]:如果想表示%和_,把%和_放在[]中

2.存储过程

create procedure procedure_name

as

variable1;

variable2;

begin

  sql

end;

3.触发器

存储过程和触发器的比较:存储过程是手动执行的;触发器是数据库做了什么操作后触发,自动执行

create trigger trigger_name

  after insert on table

begin

  sql

end;

原文地址:https://www.cnblogs.com/lsjava/p/6385038.html