sql-scripts

why is 'create table' in sql script executing 3 times when only using 1 create statement? [duplicate]

This question already has answers here : When do I need to use a semicolon vs a slash in Oracle SQL? (6 answers) Closed 2 years ago . I have an SQL script in which I want to automate the creation of a table. However, when I exec it, it seems as though it's trying to create the table 3 times. The...

Conditional update on Hana Studio (SQL Script) trigger

I have two example tables: TABLE1: ID | COLUMN_B| COLUMN_C _________|_________|_________ 1 | 0 | 1 ________|_________|_________ 2 | 0 | 1 ________|_________|_________ 3 | 0 | 1 TABLE2: ID | COLUMN_E| COLUMN_F ________|_________|________ 1 | Y | X ________|_________|_________ 2 | Y | X ________|_____...

Initialize a database with a script using Spring JDBC fails

I am trying to initialize my database with a view and a rule following 75.3 Initialize a database using Spring JDBC . 75.3 Initialize a database using Spring JDBC Spring JDBC has a DataSource initializer feature. Spring Boot enables it by default and loads SQL from the standard locations schema.sql...

How to work with javax.persistence.sql-load-script-source?

I want to automatically insert data into my MySQL tables. Therefore I try to use the JPA property "javax.persistence.sql-load-script-source" in my persistence.xml : <?xml version="1.0" encoding="UTF-8"?> <persistence version="2.0" xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www...

script to restore database sql server from bak file, doesn&#39;t work

I have an empty database: DB_Clients And I want to restore the database from a .bak file: OldDBClients.bak This is the path: C:\OldDBClients.bak And this is my script: USE [master] GO RESTORE DATABASE DB_Clients FROM DISK = 'C:\OldDBClients.bak' When I execute it, I get this error message: Msg 3154,...

Mysql: How to call sql script file from other sql script file?

Suppose I have wrote script Table_ABC.sql which creates table ABC. I have created many such scripts for each of required tables. Now i want to write a script that call all of these script files in a sequence so basically I want another script file createTables.sql. Mysql provides option to execute a...

Execute scripts by relative path in Oracle SQL Developer

First, this question relates to Oracle SQL Developer 3.2 , not SQL*Plus or iSQL, etc. I've done a bunch of searching but haven't found a straight answer. I have several collections of scripts that I'm trying to automate (and btw, my SQL experience is pretty basic and mostly MS-based). The trouble I...