This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SET @table_name = "user"; | |
SET @schema_name = "test_db"; | |
SET @output_name = CONCAT("/var/lib/mysql-files/",@table_name,".txt"); | |
SET @cols = NULL; | |
select GROUP_CONCAT(CONCAT("'",COLUMN_NAME,"'")) INTO @cols | |
from INFORMATION_SCHEMA.COLUMNS | |
WHERE TABLE_NAME = @table_name AND TABLE_SCHEMA = @schema_name; | |
SET @sql = CONCAT(" SELECT * FROM (SELECT ", @cols, " UNION ALL SELECT * FROM ", @table_name, ") as r ", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*------------------------------------------ | |
Name: oradb.cpp | |
Date: 2015 | |
Auth: Sun Dro | |
Desc: Simple example to connect to oracle | |
database with occi. | |
------------------------------------------*/ | |
#include <iostream> | |
#include <occi.h> |