Playgrounds
Snippets
Developers
Compiler
All
ActionScript
Ajax
AngularJS
Apache
AppleScript
ASP.NET
Bash
C
C#
C++
Coffee
CoffeeScript
ColdFusion
Command
CSS
Delphi
Django
ES6
GLSL
Grunt
Gulp
HAML
Haskell
HTML
iOS
Jade
Java
JavaScript
jQuery
JSX
Less
LUA
MDX
MySQL
Objective
Other
Pascal
Perl
PHP
Plain text
PowerShell
Processing
Progress
Prolog
Pseudocode
Python
Rails
RegExr
Ruby
SASS
Scala
Scheme
SCSS
SmallBASIC
Smarty
SQL
Stylus
SVG
Swift
TypeScript
VHDL
X++
XHTML
XML
Xojo
XSLT
New snippet
New playground
Sign up
Login
Upload
Playgrounds
Snippets
Developers
Sign up
Login
Codepad is a place for developers to share code snippets (PHP, Java, Bash, C, C++, Python and more). Create your HTML, CSS and JS Demos.
Sign up
Learn more
DB Stuff
25
snippets by
kim
set path postgres
SQL
0
0
1129
update using select (mysql)
SQL
2
2
1666
update using select (postgres)
SQL
0
2
1112
list all indexes from tables (Postgresql)
SQL
0
2
4056
Simple word counter using postgres
SQL
0
2
1202
Generating random integers in the range x - y (postgres)
SQL
0
2
1241
Assigns random values from a set to a table column (postgres)
SQL
0
3
1436
migration mysql to postgres (pgloader)
SQL
0
1
1571
migration example usign sakila db (pgloader)
SQL
0
1
1283
using COPY from postgres to load data from csv
Bash
0
0
1130
inserting multiple lines using multiple queries
SQL
0
1
1099
Creating a table using another two unrelated tables (postgres)
SQL
0
0
1181
(Postgres) Disconnect all users except yours
SQL
2
0
1228
(Postgres) Alter database name
SQL
0
2
1167
disable fk restriction (mysql)
MySQL
0
0
1383
list all schemas (postgres)
SQL
0
5
1516
dump only tables from postgres (cli)
Bash
0
9
1143
Show all columns for a specified table (Postgres)
Bash
0
8
1153
delete duplicated records mysql
MySQL
0
7
1259
create csv from sql on postgres
MySQL
0
8
1166
Find which tables 2 schemas differ (postgres)
SQL
0
12
1266
Create user with all access (MySQL)
MySQL
0
10
1226
Execute sql file to specific schema with psql
Bash
0
1
1999
Dump lines from tables with mysqldump (mysql)
MySQL
0
4
1221
Pretty print on mysql cli
MySQL
0
0
1159