Search
 
SCRIPT & CODE EXAMPLE
 

SQL

psql check if sql script is valid

$ pgsanity good1.sql good2.sql bad.sql
bad.sql: line 1: ERROR: syntax error at or near "bogus_token"

$ find -name '*.sql' | xargs pgsanity
./sql/bad1.sql: line 59: ERROR: syntax error at or near ";"
./sql/bad2.sql: line 41: ERROR: syntax error at or near "insert"
./sql/bad3.sql: line 57: ERROR: syntax error at or near "update"
Comment

PREVIOUS NEXT
Code Example
Sql :: row_number equivalent MS Access for sequential id By Group (3) 
Sql :: select month from date in sql 
Sql :: creating a joined view in mysql 
Sql :: sql implicit cursor 
Sql :: stored procedure function relation 
Sql :: online t-sql editor 
Sql :: 2020 new year 
Sql :: grant privileges when craeting a user 
Sql :: kill slow queries mysql 
Sql :: Raw into column 
Sql :: composit key in sql 
Sql :: how to make letter id primary key in mysql 
Sql :: distinct data types in a table sql query 
Sql :: How to take sum of column with same id in "JPQL?" 
Sql :: oracle query archive mode 
Sql :: Extend the 2.1 case study to implement below listed queries. Write separate operations/method to implement each query. a.Query all books in database. 
Sql :: How to get distinct sets of rows using SQL (Oracle)? 
Sql :: Uninstall mysql community server in centos 7 
Sql :: sql server separar numeros por comas miles 
Sql :: mysql dump everythign 
Sql :: Manage Database in MySQL 
Sql :: mysql case sensitive 
Sql :: mysql BEFORE UPDATE INSERT 
Sql :: SQL Creating a Table to Store Date and Time 
Sql :: sql redshift split into first and last name 
Sql :: how to make sure two tables have same exact data in sql 
Sql :: salesforce cpq apply immediately 
Sql :: VERIFY INDEXES WITH PARTITIONS IN SQL ORACLE 
Sql :: connecting mySQL to STS 
Sql :: postgres insert knex 
ADD CONTENT
Topic
Content
Source link
Name
3+5 =