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
1227
update using select (mysql)
SQL
2
2
1806
update using select (postgres)
SQL
0
2
1223
list all indexes from tables (Postgresql)
SQL
0
2
4160
Simple word counter using postgres
SQL
0
2
1310
Generating random integers in the range x - y (postgres)
SQL
0
2
1346
Assigns random values from a set to a table column (postgres)
SQL
0
3
1555
migration mysql to postgres (pgloader)
SQL
0
1
1692
migration example usign sakila db (pgloader)
SQL
0
1
1378
using COPY from postgres to load data from csv
Bash
0
0
1221
inserting multiple lines using multiple queries
SQL
0
1
1183
Creating a table using another two unrelated tables (postgres)
SQL
0
0
1277
(Postgres) Disconnect all users except yours
SQL
2
0
1323
(Postgres) Alter database name
SQL
0
2
1268
disable fk restriction (mysql)
MySQL
0
0
1503
list all schemas (postgres)
SQL
0
5
1644
dump only tables from postgres (cli)
Bash
0
9
1226
Show all columns for a specified table (Postgres)
Bash
0
8
1254
delete duplicated records mysql
MySQL
0
7
1376
create csv from sql on postgres
MySQL
0
8
1275
Find which tables 2 schemas differ (postgres)
SQL
0
12
1345
Create user with all access (MySQL)
MySQL
0
10
1310
Execute sql file to specific schema with psql
Bash
0
1
2157
Dump lines from tables with mysqldump (mysql)
MySQL
0
4
1307
Pretty print on mysql cli
MySQL
0
0
1271