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
1243
update using select (mysql)
SQL
2
2
1829
update using select (postgres)
SQL
0
2
1240
list all indexes from tables (Postgresql)
SQL
0
2
4174
Simple word counter using postgres
SQL
0
2
1324
Generating random integers in the range x - y (postgres)
SQL
0
2
1361
Assigns random values from a set to a table column (postgres)
SQL
0
3
1571
migration mysql to postgres (pgloader)
SQL
0
1
1707
migration example usign sakila db (pgloader)
SQL
0
1
1394
using COPY from postgres to load data from csv
Bash
0
0
1231
inserting multiple lines using multiple queries
SQL
0
1
1197
Creating a table using another two unrelated tables (postgres)
SQL
0
0
1289
(Postgres) Disconnect all users except yours
SQL
2
0
1338
(Postgres) Alter database name
SQL
0
2
1280
disable fk restriction (mysql)
MySQL
0
0
1519
list all schemas (postgres)
SQL
0
5
1661
dump only tables from postgres (cli)
Bash
0
9
1237
Show all columns for a specified table (Postgres)
Bash
0
8
1269
delete duplicated records mysql
MySQL
0
7
1391
create csv from sql on postgres
MySQL
0
8
1289
Find which tables 2 schemas differ (postgres)
SQL
0
12
1358
Create user with all access (MySQL)
MySQL
0
10
1322
Execute sql file to specific schema with psql
Bash
0
1
2179
Dump lines from tables with mysqldump (mysql)
MySQL
0
4
1319
Pretty print on mysql cli
MySQL
0
0
1283