Difference between revisions of "Select"
Jump to navigation
Jump to search
(3 intermediate revisions by the same user not shown) | |||
Line 24: | Line 24: | ||
* [[MySQL]]: <code>[[select user]] FROM [[mysql.user]];</code> | * [[MySQL]]: <code>[[select user]] FROM [[mysql.user]];</code> | ||
+ | |||
+ | [[jq]]: | ||
* <code>[[jq]] '.[] | [[select]](.color=="blue")' your_json_file.json</code> | * <code>[[jq]] '.[] | [[select]](.color=="blue")' your_json_file.json</code> | ||
+ | * <code>cat file.txt | jq '.Quotas[] | select(.QuotaName | [[contains]]("G and VT")) | {QuotaName, Value, QuotaArn, QuotaCode, Unit}'</code> | ||
Line 35: | Line 38: | ||
**<code>[[GRANT SELECT ON ALL TABLES]]</code> | **<code>[[GRANT SELECT ON ALL TABLES]]</code> | ||
* <code>[[ERROR: permission denied for relation]] your_table</code> | * <code>[[ERROR: permission denied for relation]] your_table</code> | ||
+ | * [[SELECT can cause synchronous writes on the disk]] | ||
== See also == | == See also == |
Latest revision as of 14:20, 22 May 2024
select select count select distinct
select * from your_table_name;
select * from your_db.your_table_name;
SELECT * FROM pg_stat_activity;
SELECT version();
SELECT current user;
SELECT current database();
SELECT * FROM your_table_name; ERROR: permission denied for table your_table_name
select current_setting('block_size');
- MySQL:
select user FROM mysql.user;
jq:
jq '.[] | select(.color=="blue")' your_json_file.json
cat file.txt | jq '.Quotas[] | select(.QuotaName | contains("G and VT")) | {QuotaName, Value, QuotaArn, QuotaCode, Unit}'
Related terms[edit]
- MongoDB:
db.YOUR_COLLETION_NAME.find ()
select count
select distinct
GRANT SELECT
ERROR: permission denied for relation your_table
- SELECT can cause synchronous writes on the disk
See also[edit]
- SELECT, GRANT SELECT ON, BETWEEN
- SQL, NewSQL, RDMS: GraphQL (2015), SQLite,
select, insert
,select count
, Distributed SQL, TablePlus, Cache hit ratio,pg_stat_user_tables
,EXPLAIN
, Index (PostgreSQL), DDL, SQL/MED, Group by, List users, SQL Injection, SQLAlchemy,CREATE USER, CREATE ROLE, EXPLAIN, ALTER DATABASE, REVOKE, NOLOCK, NOWAIT, EXISTS
, Unique constraint,.sql
Advertising: