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';
Get mysql version
SELECT version();
Get the size of your databases
SELECT table_schema 'intranet' , sum(data_length+index_length)/1024/1024 'db size in MB' FROM tables GROUP BY table_schema;
There are no comments on this page. [Add comment]