ResultSet rs = stmt.executeQuery("SELECT userid, username FROM USER");
while (rs.next()) {
int i = rs.getInt("userid");
String str = rs.getString("username");
User user = new User(i, str);
al.add(user);
}
Oracle Teknolojileri, Weblogic, SOA Suite, Java, Kurumsal Veri Sözlüğü, API Gateway, API Manager, Veri Sözlüğü, SOAGEN, Metanizer, Apinizer
ResultSet rs = stmt.executeQuery("SELECT userid, username FROM USER");
while (rs.next()) {
int i = rs.getInt("userid");
String str = rs.getString("username");
User user = new User(i, str);
al.add(user);
}
CREATE TABLE alumnos ( ID integer NOT NULL, NOMBRE varchar(100) NOT NULL, CLAVE varchar(100) NOT NULL, PRIMARY KEY (ID) )
CREATE TABLE materias ( ID integer NOT NULL, NOMBRE VARCHAR(100) NOT NULL, PRIMARY KEY (ID) )
CREATE TABLE alumnos_materias ( ALUMNO_ID integer NOT NULL, MATERIA_ID integer NOT NULL, PRIMARY KEY (ALUMNO_ID, MATERIA_ID), FOREIGN KEY (ALUMNO_ID) REFERENCES alumnos (ID), FOREIGN KEY (MATERIA_ID) REFERENCES materias (ID)
)
INSERT INTO alumnos VALUES (1, 'Alumno 1', '00001'); INSERT INTO alumnos VALUES (2, 'Alumno 2', '00002'); INSERT INTO alumnos VALUES (3, 'Alumno 3', '00003'); INSERT INTO alumnos VALUES (4, 'Alumno 4', '00004'); INSERT INTO alumnos VALUES (5, 'Alumno 5', '00005'); INSERT INTO alumnos VALUES (6, 'Alumno 6', '00006'); INSERT INTO alumnos VALUES (7, 'Alumno 7', '00007'); INSERT INTO alumnos VALUES (8, 'Alumno 8', '00008'); INSERT INTO alumnos VALUES (9, 'Alumno 9', '00009'); INSERT INTO alumnos VALUES (10, 'Alumno 10', '000010'); INSERT INTO materias VALUES (1, 'Matematicas'); INSERT INTO materias VALUES (2, 'Fisica'); INSERT INTO materias VALUES (3, 'Quimica'); INSERT INTO materias VALUES (4, 'Biologia'); INSERT INTO materias VALUES (5, 'Historia'); INSERT INTO materias VALUES (6, 'Geografia'); INSERT INTO alumnos_materias VALUES (1, 1); INSERT INTO alumnos_materias VALUES (1, 3); INSERT INTO alumnos_materias VALUES (1, 5); INSERT INTO alumnos_materias VALUES (2, 1); INSERT INTO alumnos_materias VALUES (2, 2); INSERT INTO alumnos_materias VALUES (2, 3); INSERT INTO alumnos_materias VALUES (3, 2); INSERT INTO alumnos_materias VALUES (3, 4); INSERT INTO alumnos_materias VALUES (3, 6); INSERT INTO alumnos_materias VALUES (4, 4); INSERT INTO alumnos_materias VALUES (4, 5); INSERT INTO alumnos_materias VALUES (4, 6); INSERT INTO alumnos_materias VALUES (5, 1); INSERT INTO alumnos_materias VALUES (5, 4); INSERT INTO alumnos_materias VALUES (5, 5); INSERT INTO alumnos_materias VALUES (6, 2); INSERT INTO alumnos_materias VALUES (6, 5); INSERT INTO alumnos_materias VALUES (6, 6); INSERT INTO alumnos_materias VALUES (7, 1); INSERT INTO alumnos_materias VALUES (7, 3); INSERT INTO alumnos_materias VALUES (7, 5); INSERT INTO alumnos_materias VALUES (8, 1); INSERT INTO alumnos_materias VALUES (8, 2); INSERT INTO alumnos_materias VALUES (8, 3); INSERT INTO alumnos_materias VALUES (9, 2); INSERT INTO alumnos_materias VALUES (9, 4); INSERT INTO alumnos_materias VALUES (9, 6); INSERT INTO alumnos_materias VALUES (10, 4); INSERT INTO alumnos_materias VALUES (10, 5); INSERT INTO alumnos_materias VALUES (10, 6);