WaZaRWiki : MySQLTips

GaelReignier :: Categories :: PageIndex :: RecentChanges :: RecentlyCommented :: Login/Register :: Hosted by: eNiX

Revision [171]

This is an old revision of MySQLTips made by GaelReignier on 2008-07-22 19:37:45.
ITTips



User management:

show grants: displays information about users http://dev.mysql.com/doc/refman/5.0/en/show-grants.html


mysqldump:

1 insert per line: use the option: --skip-extended-insert

Add a specific column in a select statement filled with the same value:

Select "MyValue" as source, tableName.* from tableName;

Source: will be the column title and it will be filled with "MyValue" for all the results

Get a specific number of charactere from a select statement

SELECT SUBSTRING(mother_of_all_results.source FROM 3 FOR 10) AS username, mother_of_all_results.*
FROM mother_of_all_results;


Create a table from another one


CREATE TABLE mother_of_all_results AS
SELECT * FROM mother_of_all_searches WHERE  particulars_id = 'X' OR  particulars_id = 'Y' OR  particulars_id = 'Z';

There are no comments on this page. [Add comment]

Valid XHTML 1.0 Transitional :: Valid CSS :: Powered by WikkaWiki
Page was generated in 0.2340 seconds