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
1308
update using select (mysql)
SQL
2
2
1922
update using select (postgres)
SQL
0
2
1295
list all indexes from tables (Postgresql)
SQL
0
2
4241
Simple word counter using postgres
SQL
0
2
1397
Generating random integers in the range x - y (postgres)
SQL
0
2
1415
Assigns random values from a set to a table column (postgres)
SQL
0
3
1639
migration mysql to postgres (pgloader)
SQL
0
1
1763
migration example usign sakila db (pgloader)
SQL
0
1
1460
using COPY from postgres to load data from csv
Bash
0
0
1299
inserting multiple lines using multiple queries
SQL
0
1
1259
Creating a table using another two unrelated tables (postgres)
SQL
0
0
1344
(Postgres) Disconnect all users except yours
SQL
2
0
1404
(Postgres) Alter database name
SQL
0
2
1336
disable fk restriction (mysql)
MySQL
0
0
1590
list all schemas (postgres)
SQL
0
5
1739
dump only tables from postgres (cli)
Bash
0
9
1290
Show all columns for a specified table (Postgres)
Bash
0
8
1319
delete duplicated records mysql
MySQL
0
7
1461
create csv from sql on postgres
MySQL
0
8
1352
Find which tables 2 schemas differ (postgres)
SQL
0
12
1403
Create user with all access (MySQL)
MySQL
0
10
1368
Execute sql file to specific schema with psql
Bash
0
1
2274
Dump lines from tables with mysqldump (mysql)
MySQL
0
4
1375
Pretty print on mysql cli
MySQL
0
0
1342