發新話題
打印

[Mysql] *** MYSQL

本主題被作者加入到個人文集中

*** MYSQL

https://stackoverflow.com/questi ... -file-in-phpmyadmin Try to import it from mysql console as per the taste of your OS.
引用:
mysql -u {DB-USER-NAME} -p {DB-NAME} < {db.file.sql path}
or if it's on a remote server use the -h flag to specify the host.
引用:
mysql -u {DB-USER-NAME} -h {MySQL-SERVER-HOST-NAME} -p {DB-NAME} < {db.file.sql path}

TOP

引用:
https://www.iteye.com/blog/lobert-1604122



引用:
PATH=$PATH:/opt/lampp/bin
Path for Mysql
引用:
select * from cdb_pms where msgfromid > 33900;

TOP

REVOKE ALL PRIVILEGES ON

Export csv 


SELECT
    orderNumber, status, orderDate, requiredDate, comments
FROM
    orders
WHERE
    status = 'Cancelled'
INTO OUTFILE 'C:/tmp/cancelled_orders.csv'
FIELDS ENCLOSED BY '"'
TERMINATED BY ';'
ESCAPED BY '"'
LINES TERMINATED BY '\r\n';
>>>>>>>>>>>>>>>>>>

SELECT column_name(s)
FROM table1
INNER JOIN table2
ON table1.column_name = table2.column_name;


>>>>>>>>>>>




引用:
REVOKE ALL PRIVILEGES ON `User`.* FROM 'Database'@'%'; GRANT ALL PRIVILEGES ON `User`.* TO 'Database'@'%';
引用:
SELECT * FROM cdb_posts WHERE fid =44 LIMIT 0 , 30 SELECT * FROM `cdb_threads` WHERE fid = 44;
https://stackoverflow.com/questions/10562915/selecting-rows-with-id-from-another-table Try this (subquery):
引用:
SELECT * FROM terms WHERE id IN (SELECT term_id FROM terms_relation WHERE taxonomy = "categ")
Or you can try this (JOIN):
引用:
SELECT t.* FROM terms AS t INNER JOIN terms_relation AS tr ON t.id = tr.term_id AND tr.taxonomy = "categ"
If you want to receive all fields from two tables:
引用:
SELECT t.id, t.name, t.slug, tr.description, tr.created_at, tr.updated_at FROM terms AS t INNER JOIN terms_relation AS tr ON t.id = tr.term_id AND tr.taxonomy = "categ"

TOP

發新話題