Search
 
SCRIPT & CODE EXAMPLE
 

SQL

mysql into outfile with headers

SELECT * FROM (
    SELECT 'username','email'
    UNION ALL
    (
        SELECT `username`,`email`,`steam_id` FROM `users` WHERE `userna` LIKE '%@temp%'
    )
) resulting_set
INTO OUTFILE '/results/result.txt' FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"' LINES TERMINATED BY '
';
Comment

PREVIOUS NEXT
Code Example
Sql :: how to get the maximum length of a name in sql 
Sql :: SQL SELECT TOP Equivalent in MySQL 
Sql :: sql dcl 
Sql :: max 3 salary in sql 
Sql :: how to check user grant in mysql 
Sql :: relation does not exist postgresql 
Sql :: postgresql where and 
Sql :: delete vs truncate sql server 
Sql :: could not assemble any primary key columns for mapped table sqlalchemy 
Sql :: graphql 
Sql :: mysql last friday of current month 
Sql :: mysqli auto increment id 
Sql :: get current date sql 
Sql :: how to use query in nosql 
Sql :: How to check if a column exists in a SQL Server table? 
Sql :: C# mysql data reader from two tables 
Sql :: mysql select inside sum 
Sql :: isnull in sqlite 
Sql :: having in sql 
Sql :: changing name of column and datatype in sql 
Sql :: peewee print sql 
Sql :: sql foreign key constraint 
Sql :: how to check common records in 2 table 
Sql :: oracle sql all days except weekends 
Sql :: dns slave zone convert 
Sql :: Inserting data into different tables at once in oracle sql 
Sql :: macos oracle docker oracle11g 
Sql :: .env pgsql 
Sql :: h2 auto increment and unique 
Sql :: find current server name for SSMS 
ADD CONTENT
Topic
Content
Source link
Name
8+2 =