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
| SELECT CONVERT(content USING utf8mb4) content | |
| from svc_messages_instance; |
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
| SELECT * FROM source.jag_future_service_interaction | |
| where createdOn >= now() - interval 3 day; |
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
| SELECT table_name | |
| FROM information_schema.tables | |
| WHERE table_schema = 'lisa_dev_test2' | |
| AND table_name LIKE '%intent%' |
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
| USE `agent-db`; |
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
| javap -v [path to your class file] | grep 'major version' |
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
| # display duplicate rows | |
| SELECT | |
| * | |
| FROM ( | |
| SELECT | |
| person_id, | |
| @rank := IF( @email = email and @firstname = firstname, @rank + 1, 1) AS row_number, | |
| @email := email as email, | |
| @firstname := firstname as firstname | |
| FROM |
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
| SELECT TABLE_NAME, | |
| COLUMN_NAME, | |
| CONSTRAINT_NAME, | |
| REFERENCED_TABLE_NAME, | |
| REFERENCED_COLUMN_NAME | |
| FROM information_schema.KEY_COLUMN_USAGE | |
| WHERE TABLE_NAME = "<TABLE_NAME>"; |
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
| aws ssm describe-parameters --query "Parameters[].{Name:Name,Description:Description}" --output text |
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
| #connect to mysql | |
| mysql -u root -p | |
| #list privileges | |
| select user,host from mysql.user; | |
| # create new schema | |
| CREATE SCHEMA `[SCHEMA_NAME]` DEFAULT CHARACTER SET utf8; | |
| # grant acess on schema to user |
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
| #MySQL 8 | |
| #convert uuid binary(16) to String | |
| SELECT BIN_TO_UUID(uuid) FROM foo | |
| #convert uuid string to binary(16) | |
| SELECT UUID_TO_BIN(UUID()) | |
| #MySQL 5,6,7 |
NewerOlder