Skip to content

Commit

Permalink
print columns to file
Browse files Browse the repository at this point in the history
  • Loading branch information
Vitalii Cherkashyn authored Oct 18, 2020
1 parent 5b37c2f commit 3abd181
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions mariadb.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,9 @@ describe table_name;
show columns from table_name;
select * from information_schema.columns where TABLE_NAME='listings_dir' and COLUMN_NAME like '%PRODUCT%';
```
```sh
mycli mysql://user:passw@host:port/schema --execute "select table_name, column_name, data_type from information_schema.columns where TABLE_NAME like 'hlm%' order by TABLE_NAME, ORDINAL_POSITION;" | awk -F '\t' '{print $1","$2","$3}' > columns
```

### add column
```sql
Expand Down

0 comments on commit 3abd181

Please sign in to comment.