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 94 posted 5 years ago by kat
search database for column names
0 91 posted 5 years ago by kat
run these in the SQL tab
0 74 posted 8 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 104 posted 9 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 54 posted 9 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 84 posted 9 years ago by derebus
1 108 posted 9 years ago by traeregan
Find column name in all tables of a database
2 117 posted 9 years ago by hairajeshk
You can use this SP like that; Exec CleanInjection 'INFECTED WORD','CLEAN WORD' (in use : Exec CleanInjection '<script></script>','')
2 69 posted 10 years ago by emregulcan
Create a new utf8 database in MySQL
1 55 posted 10 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 62 posted 10 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 60 posted 10 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 88 posted 10 years ago by rengber
Dead simple, but often forgotten.
1 89 posted 10 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 102 posted 10 years ago by rengber
If a "InReplyToID" is provided, it must be a valid MessageId
1 142 posted 10 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 72 posted 11 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 98 posted 11 years ago by rengber
Minimal syntax for cursor use. See URL for SQL 2005 options and improvements.
0 107 posted 11 years ago by rengber
0 66 posted 11 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 59 posted 11 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 102 posted 12 years ago by zingo
« Prev 1 2