Welcome To Snipplr


Everyone's Recent SQL Snippets Tagged database



« Prev 1 2
search database for column names http://vyaskn.tripod.com/sql_server_search_and_replace.htm EXEC SearchAllTables 'Computer' GO
0 1244 posted 11 years ago by kat
search database for column names
0 1283 posted 11 years ago by kat
run these in the SQL tab
0 1222 posted 14 years ago by xcsteve99
Get the value of the autonumber field for the last record inserted into an Access database via the current connection.
0 1410 posted 14 years ago by wizard04
Field1 + Field2 + Field3 should create 1 entry for each unique row in the DB. In an employee table, this would be FirstName + LastName + EmployeeNumber
1 1182 posted 14 years ago by ezerick
Solucion a error cuando mudamos una bd de una pc a otra y luego no podemos crear un diagrama de la BD
2 1803 posted 15 years ago by derebus
1 1761 posted 15 years ago by traeregan
Find column name in all tables of a database
2 1955 posted 15 years ago by hairajeshk
You can use this SP like that; Exec CleanInjection 'INFECTED WORD','CLEAN WORD' (in use : Exec CleanInjection '<script></script>','')
2 1637 posted 15 years ago by emregulcan
Create a new utf8 database in MySQL
1 1184 posted 15 years ago by manuelstofer
I had several vocabularies but wanted to merge them into one. A simple query does this for you. The vocabulary_id where I wanted to merge all the tags into is 3 The vocabulary_id where the tags are to be merged from is 7, 8 and 12
2 1513 posted 15 years ago by berkes
If you need to list all of the MySQL databases managed by Plesk along with their corresponding domains and login credentials, you can use this query:
1 1364 posted 16 years ago by tobewan
I am forever forgetting this. Have to look up the 101 vs 103 in books online every time. Also forget which way around is US/NZ format. :-)
1 1813 posted 16 years ago by rengber
Dead simple, but often forgotten.
1 1510 posted 16 years ago by rengber
From StackOverflow. I'm still not quite happy with my understanding of it, but it looks an order of magnitude more elegant than most I've found.
0 1369 posted 16 years ago by rengber
This sql query will select the past version information about a given file from the database. An example would be searching for %ApprovalHistoryVOImpl% would return all past version numbers (in the database) for the ApprovalHistoryVOImpl.class file....
0 1428 posted 16 years ago by theonlyalterego
This as it sits isn't an improvement on what happens by default. It's only useful combined with a compensating transaction or sad path in the catch block, or in allowing a loop to continue.
0 1345 posted 16 years ago by rengber
Minimal syntax for cursor use. See URL for SQL 2005 options and improvements.
0 1429 posted 16 years ago by rengber
0 1242 posted 17 years ago by DaveChild
This script should be run from the "master" database. It will destroy the dev copy of a database and restore from the live copy. Code slightly modified from original (linked).
0 1179 posted 17 years ago by DaveChild
You can store an IP address in an INT UNSIGNED (4 bytes) which is of course much more efficient and faster than a CHAR(15). MySQL has two built-in functions: INET_ATON() and INET_NTOA(). These two functions are used allover the place in any TCP/IP s...
0 1757 posted 17 years ago by zingo
1 1262 posted 18 years ago by bassnode
You can generate a simple bar chart of the values by executing this command...
0 1410 posted 18 years ago by zingo
« Prev 1 2