You searched for articles tagged with SQL.

MySQL Case Insensitivity Permalink

MySQL, SQL Added less than a year ago

From the MySQL docs:

The default character set and collation are latin1 and latin1_swedish_ci, so nonbinary string comparisons are case insensitive by default.

... so if you were trying to do something like this:

SELECT * FROM thetable WHERE colname REGEXP '^[A-Z]';

... and you were wondering why you were getting back results where colname started with lowercase letters too, this is why! Try this instead:

SELECT * FROM thetable WHERE colname COLLATE latin1_bin REGEXP '^[A-Z]';



Using dbish Permalink

Perl, SQL Added less than a year ago

dbish is the command-line app that comes with DBI. It acts as a shell to the database - so it can be used instead of the mysql, psql, sqlite3 etc utilities to give a consistent interface for dealing with databases in different database applications.

An example of its use:

$ dbish dbi:mysql:databasename username
username@dbi:mysql:databasename> show tables;
...
username@dbi:mysql:databasename> select * from table limit 3;
...
^D



(Nothing Older) ... (Nothing Newer)

Colophon

Django Python 960.gs Git Vim NetBSD Nginx

The Author

The author is a software engineer living in Australia. He sux at guitar, loves camping, doesn't like cake, does like coffee and is a lazy home brewer.

Meta

Help
Latest entries

*BSD Agile Apache Apple Athletics Beer Best-Practice Censorship Comedy Cool Crosswords Deployment Django English Exim Firefox Git Hardcore Health Interface irssi Javascript Jira Languages Linux Makefile Markdown Mathematics Mobile Broadband MySQL NetBSD nginx Nokia OSX Perl Photo Privacy Python Rant Requirements rsync Ruby Shell Slackware SQL SQLite SSH Standards Subversion Testing ThisBlog Vim VMWare (Fusion) VPN WDTEM X Yum zsh

Recent Entries

Perldoc Output
Yum
Possum
Git's Index
Jira Project Keys
The Coffee Shop
Git GUI
It is more important...
Questioning Unix (and Other) File Times
The Frog King Photo
Rain Cloud Photo
rsync
Timezone
utf8 in your Perl
Theatre Ceiling Photo
Some problems are so complex...
Colours in your PAGER
zsh vared
zsh magic-equals and double-star
Funny Tweets

Links

ChoppingBoard, Project365, RageQuit

♥ Actors/Artists/Characters