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 640 posted 9 years ago by kat
search database for column names
0 619 posted 9 years ago by kat
run these in the SQL tab
0 566 posted 12 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 720 posted 12 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 513 posted 13 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 743 posted 13 years ago by derebus
1 753 posted 13 years ago by traeregan
Find column name in all tables of a database
2 826 posted 13 years ago by hairajeshk
You can use this SP like that; Exec CleanInjection 'INFECTED WORD','CLEAN WORD' (in use : Exec CleanInjection '<script></script>','')
2 654 posted 13 years ago by emregulcan
Create a new utf8 database in MySQL
1 561 posted 14 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 616 posted 14 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 684 posted 14 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 765 posted 14 years ago by rengber
Dead simple, but often forgotten.
1 711 posted 14 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 693 posted 14 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 649 posted 14 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 644 posted 15 years ago by rengber
Minimal syntax for cursor use. See URL for SQL 2005 options and improvements.
0 736 posted 15 years ago by rengber
0 574 posted 15 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 518 posted 15 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 847 posted 15 years ago by zingo
You can generate a simple bar chart of the values by executing this command...
0 727 posted 16 years ago by zingo
« Prev 1 2