Pratik Sql Sorguları

Bahadır
Written by Bahadır on
Pratik Sql Sorguları
  • Kolayca db kopyası çıkartma
    mysqldump --user="kullanici" --password="sifre" database1 | mysql --user "kullanici" --password="sifre" database2;
    
  • Kolayca tablo yedeği alma
    SELECT * INTO backedup_tablename FROM original_tablename
    
  • Birleştirilimiş data tablosu oluşturma
    SELECT * INTO mergeddatatable
    FROM
    (
    select * from DB1.dbo.tabledata
    union all
    select * from DB2.dbo.tabledata
    union all
    select * from DB3.dbo.tabledata
    union all
    select * from DB4.dbo.tabledata
    union all
    select * from DB5.dbo.tabledata
    union all
    select * from DB6.dbo.tabledata
    ) as t1
    

Comments

comments powered by Disqus