A very cool and powerful capability in MySQL and other databases is the ability to incorporate regular expression syntax when selecting data. The regular expresion support in MySQL is extensive. This recipe reviews regular expression use in MySQL and lists the supported regular expression metacharacters.
To get the PubDate element of an RSS feed to validate, it needs to be in RFC-822 format. MySQL has flexible ways of working with dates and times which make this a simple task.
MySQL provides an easy mechanism for writing the results of a select statement into a text file on the server. Using extended options of the INTO OUTFILE nomenclature, it is possible to create a comma separated value (CSV) which can be imported into a spreadsheet application such as OpenOffice or Excel or any other applciation which accepts data in CSV format.
Sometimes every occurance of a value which may be duplicated multiple times in a result set is not needed. For example, if making a pulldown menu list of options, each option should be seen only once. The DISTINCT keyword in a select statement eliminates duplication in the result set.
If you change your mind and want to rename an existing MySQL table, with or without data in it, it is no problem. One simple command will change the table’s name.
This is a great set of two commands that allow the creation and population of a new table with the structure and data of an existing table. This provides a quick means of making a point-in-time copy of a table and is a safe, easy way to make a quick copy of a table for testing an application in development on live data without risking a production environment.
You can easily determine what version of MDAC your are running on your SQL Server by just typing a few lines into the query window. To do this:
You can easily determine your CD key for your SQL Server software by just typing a few lines into the query window. To do this:
You can get the file location, size, maxsize, growth and usage attributes of a database without leaving your Enterprise Manager or Management Studio. To do this:
If you need to attach a database that has no log file (.LDF), or have deleted the log file because it was too big and need to reattach the database, SQL Server 2005 does allow you to do this. You can attach the database by following this Tech-Recipe:
It is sometimes necessary to modify the number of characters displayed in a query result set, especially when you are dealing with results containing a large number of columns. To configure the maximum number of characters displayed, do the following…
One almost always runs into a situation that requires a comma delimited result set from a query so that the data can be utilized by other software. Luckily, this is a native feature in the Query Editor.
1...357358359...516Page 358 of 516 error: Content is protected !!