BADU + QUIN + DZ9PARA PAULIN - Boladao com os Iluminati. Trabalho em equipe: Fernanda, Jessica, Quin, Badu, Dz9, Inox, Del Carmo, Pablo, Seu Roberto.Captacao de material. Valeu o churrasquinho com a galera do bloco Boca do Lixo, relembrando os sambas do compositor Betinho. There is no a SQL standard to limit the number of records returned in a query, ie, each vendor implements this functionality in its own way.Here's a summary on how to do this for some vendors:DB2 -- select * from table fetch first 10 rows only Informix, InterBase/Firebird, SKIP -- select first 10 * from table Microsoft SQL Server and Access -- select top 10 * from table MySQL, PostgreSQL, SQLite, HSQL/H2 -- select * from table limit 10 Oracle -- select * from table where rownum <= 10Oracle Note:If the query has "group by" or "order by" rownum must be supplied:Ex:SELECT a, b, cFROM( SELECT a, b, c, ROWNUM rnFROM( SELECT a, b, c FROM RECORD WHERE AVAIL='Y"ORDER BY DATE DESC)WHERE ROWNUM <= 25)WHERE rn >= 21;References:http://stackoverflow.com/questions/595123/is-there-an-ansi-sql-alternative-to-the-mysql-limit-keywordhttp://www.macoratti.net/d250102.htmhttp://www.dougboude.com/blog/1/2006/06/Equivalent-of-SQL-TOP-X-in-Oracle.cfmhttp://www.dbforums.com/oracle/1214188-limit-clause-oracle-sql.html I did the test on 09/12 and got through!I was taking 70% in Mocks and hoped to pass with a score about 75% or 80%, but the test was harder than I expected and I passed with 68%.As I had posted October, 1st, I based my studies on EPractize Labs Study Guide and Mock Exam, because I had already read Katy Sierra's book Head First J2EE1.4 sometimes on other occasions. Also I read in a Servlet 3.0 spec.I really do not recommend EPractize Labs. The Study Guide is very superficial and Mock has many errors. In addition, the Mock is not consistent with the real exam. The real exam does not cover almost anything about custom tags and it covers much of the Servlet 3.0 spec, but Mock is upside down.I believe Piotr's web page (http://piotrnowicki.com/2011/03/jee-6-scwcd-mock-questions/) saved me. It has 67 questions focused on the Servlet 3.0 specification. Enthuware Mock also helped a lot (http://enthuware.com/index.php/mock-exams/oracle-certified-expert/oce-jsp-servlet-mock-questions).This Mock is cheaper and the quality of it is infinitely greater. The proof is that in addition to being 100% Test Pass Garantee, they return the money if you find three errors. Many exam questions were very similar to those on Mock.My tip for anyone to prepare for this test is:* Study the book Head First Servlets & JSP, Second Edition (JEE5): http://shop.oreilly.com/product/9780596516680.do?green=25526262438&cmp=af-mybuy-9780596516680.IP * Study the JSR-315 Spec Servlets 3.0: http://jcp.org/aboutJava/communityprocess/mrel/jsr315/index.html * Answering the questions of Piotr* Make Enthuware Mock ExamsFollowing these steps with time, for sure you will do better than me :-)Good studies! Here you have auto generated ID's examples using Hibernate with Oracle and MySql databases.Oracle...@Entity@Table(name = "grupo")public class Grupo implements GenericModel { @Id @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "GRUPO_ID_SEQ") @SequenceGenerator(name = "GRUPO_ID_SEQ", sequenceName = "GRUPO_ID_SEQ", allocationSize = 1) @Column(nullable=false) private Long id_grupo;...Sequence GRUPO_ID_SEQ must exist in Oracle database.Considering that MySql does not have sequences, if you try to use the code above with MySql you will get a runtime exception:Caused by: org.hibernate.MappingException: Dialect does not support sequences at org.hibernate.dialect.Dialect.getSequenceNextValString(Dialect.java:619) at org.hibernate.id.SequenceGenerator.configure(SequenceGenerator.java:88) at org.hibernate.id.SequenceHiLoGenerator.configure(SequenceHiLoGenerator.java:66) at org.hibernate.id.IdentifierGeneratorFactory.create(IdentifierGeneratorFactory.java:127)MySQL...@Entity@Table(name = "grupo")public class Grupo implements GenericModel