Package org.springframework.jdbc.core

Examples of org.springframework.jdbc.core.JdbcTemplate.execute()


        template
                .execute("CREATE TABLE pets (id INT NOT NULL IDENTITY PRIMARY KEY, name VARCHAR(30), birth_date DATE, type_id INT NOT NULL, owner_id INT NOT NULL)");
        template.execute("alter table pets add constraint fk_pets_owners foreign key (owner_id) references owners(id)");
        template.execute("alter table pets add constraint fk_pets_types foreign key (type_id) references types(id)");

        template
                .execute("CREATE TABLE visits (id INT NOT NULL IDENTITY PRIMARY KEY, pet_id INT NOT NULL, visit_date DATE, description VARCHAR(255))");
        template.execute("alter table visits add constraint fk_visits_pets foreign key (pet_id) references pets(id)");

        // Schema: Spring Security
        template
View Full Code Here


        template.execute("alter table pets add constraint fk_pets_owners foreign key (owner_id) references owners(id)");
        template.execute("alter table pets add constraint fk_pets_types foreign key (type_id) references types(id)");

        template
                .execute("CREATE TABLE visits (id INT NOT NULL IDENTITY PRIMARY KEY, pet_id INT NOT NULL, visit_date DATE, description VARCHAR(255))");
        template.execute("alter table visits add constraint fk_visits_pets foreign key (pet_id) references pets(id)");

        // Schema: Spring Security
        template
                .execute("CREATE TABLE users (username VARCHAR(50) NOT NULL PRIMARY KEY, password VARCHAR(50) NOT NULL, enabled BIT NOT NULL)");
        template.execute("CREATE TABLE authorities (username VARCHAR(50) NOT NULL, authority VARCHAR(50) NOT NULL)");
View Full Code Here

        template
                .execute("CREATE TABLE visits (id INT NOT NULL IDENTITY PRIMARY KEY, pet_id INT NOT NULL, visit_date DATE, description VARCHAR(255))");
        template.execute("alter table visits add constraint fk_visits_pets foreign key (pet_id) references pets(id)");

        // Schema: Spring Security
        template
                .execute("CREATE TABLE users (username VARCHAR(50) NOT NULL PRIMARY KEY, password VARCHAR(50) NOT NULL, enabled BIT NOT NULL)");
        template.execute("CREATE TABLE authorities (username VARCHAR(50) NOT NULL, authority VARCHAR(50) NOT NULL)");
        template
                .execute("alter table authorities add constraint fk_authorities_users foreign key (username) references users(username)");
View Full Code Here

        template.execute("alter table visits add constraint fk_visits_pets foreign key (pet_id) references pets(id)");

        // Schema: Spring Security
        template
                .execute("CREATE TABLE users (username VARCHAR(50) NOT NULL PRIMARY KEY, password VARCHAR(50) NOT NULL, enabled BIT NOT NULL)");
        template.execute("CREATE TABLE authorities (username VARCHAR(50) NOT NULL, authority VARCHAR(50) NOT NULL)");
        template
                .execute("alter table authorities add constraint fk_authorities_users foreign key (username) references users(username)");

        // Data: Petclinic
        template.execute("INSERT INTO vets VALUES (1, 'James', 'Carter')");
View Full Code Here

        // Schema: Spring Security
        template
                .execute("CREATE TABLE users (username VARCHAR(50) NOT NULL PRIMARY KEY, password VARCHAR(50) NOT NULL, enabled BIT NOT NULL)");
        template.execute("CREATE TABLE authorities (username VARCHAR(50) NOT NULL, authority VARCHAR(50) NOT NULL)");
        template
                .execute("alter table authorities add constraint fk_authorities_users foreign key (username) references users(username)");

        // Data: Petclinic
        template.execute("INSERT INTO vets VALUES (1, 'James', 'Carter')");
        template.execute("INSERT INTO vets VALUES (2, 'Helen', 'Leary')");
View Full Code Here

        template.execute("CREATE TABLE authorities (username VARCHAR(50) NOT NULL, authority VARCHAR(50) NOT NULL)");
        template
                .execute("alter table authorities add constraint fk_authorities_users foreign key (username) references users(username)");

        // Data: Petclinic
        template.execute("INSERT INTO vets VALUES (1, 'James', 'Carter')");
        template.execute("INSERT INTO vets VALUES (2, 'Helen', 'Leary')");
        template.execute("INSERT INTO vets VALUES (3, 'Linda', 'Douglas')");
        template.execute("INSERT INTO vets VALUES (4, 'Rafael', 'Ortega')");
        template.execute("INSERT INTO vets VALUES (5, 'Henry', 'Stevens')");
        template.execute("INSERT INTO vets VALUES (6, 'Sharon', 'Jenkins')");
View Full Code Here

        template
                .execute("alter table authorities add constraint fk_authorities_users foreign key (username) references users(username)");

        // Data: Petclinic
        template.execute("INSERT INTO vets VALUES (1, 'James', 'Carter')");
        template.execute("INSERT INTO vets VALUES (2, 'Helen', 'Leary')");
        template.execute("INSERT INTO vets VALUES (3, 'Linda', 'Douglas')");
        template.execute("INSERT INTO vets VALUES (4, 'Rafael', 'Ortega')");
        template.execute("INSERT INTO vets VALUES (5, 'Henry', 'Stevens')");
        template.execute("INSERT INTO vets VALUES (6, 'Sharon', 'Jenkins')");
View Full Code Here

                .execute("alter table authorities add constraint fk_authorities_users foreign key (username) references users(username)");

        // Data: Petclinic
        template.execute("INSERT INTO vets VALUES (1, 'James', 'Carter')");
        template.execute("INSERT INTO vets VALUES (2, 'Helen', 'Leary')");
        template.execute("INSERT INTO vets VALUES (3, 'Linda', 'Douglas')");
        template.execute("INSERT INTO vets VALUES (4, 'Rafael', 'Ortega')");
        template.execute("INSERT INTO vets VALUES (5, 'Henry', 'Stevens')");
        template.execute("INSERT INTO vets VALUES (6, 'Sharon', 'Jenkins')");

        template.execute("INSERT INTO specialties VALUES (1, 'radiology')");
View Full Code Here

        // Data: Petclinic
        template.execute("INSERT INTO vets VALUES (1, 'James', 'Carter')");
        template.execute("INSERT INTO vets VALUES (2, 'Helen', 'Leary')");
        template.execute("INSERT INTO vets VALUES (3, 'Linda', 'Douglas')");
        template.execute("INSERT INTO vets VALUES (4, 'Rafael', 'Ortega')");
        template.execute("INSERT INTO vets VALUES (5, 'Henry', 'Stevens')");
        template.execute("INSERT INTO vets VALUES (6, 'Sharon', 'Jenkins')");

        template.execute("INSERT INTO specialties VALUES (1, 'radiology')");
        template.execute("INSERT INTO specialties VALUES (2, 'surgery')");
View Full Code Here

        // Data: Petclinic
        template.execute("INSERT INTO vets VALUES (1, 'James', 'Carter')");
        template.execute("INSERT INTO vets VALUES (2, 'Helen', 'Leary')");
        template.execute("INSERT INTO vets VALUES (3, 'Linda', 'Douglas')");
        template.execute("INSERT INTO vets VALUES (4, 'Rafael', 'Ortega')");
        template.execute("INSERT INTO vets VALUES (5, 'Henry', 'Stevens')");
        template.execute("INSERT INTO vets VALUES (6, 'Sharon', 'Jenkins')");

        template.execute("INSERT INTO specialties VALUES (1, 'radiology')");
        template.execute("INSERT INTO specialties VALUES (2, 'surgery')");
        template.execute("INSERT INTO specialties VALUES (3, 'dentistry')");
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.