-- Create sequence create sequence adfadfdfd minvalue 1 maxvalue 99999999 start with 41 increment by 1 cache 20 cycle;
每次调用sequence.nextval方法,都会将当前sequence值加1,然后返回该值。sequence.currval则返回当前值。
另外一个左右联接的问题。两表,表a有5条数据,表b有3条数据,则a left join b时,会输出5条记录,而right join时,只会有3条。inner join则是两个表的交集。
SELECT * FROM a INNER JOIN b ON a.aID =b.bID
等同于以下SQL句:
SELECT * FROM a,b WHERE a.aID = b.bID
原创文章,作者:苏葳,如需转载,请注明出处:https://www.swmemo.com/405.html