Difference between revisions of "Select"
Jump to navigation
Jump to search
Line 5: | Line 5: | ||
− | [[PostgreSQL select]]: | + | [[PostgreSQL select|PostgreSQL]]: |
* <code> select * from your_table_name;</code> | * <code> select * from your_table_name;</code> | ||
* <code> select * from your_db.your_table_name;</code> | * <code> select * from your_db.your_table_name;</code> | ||
* <code>[[SELECT * FROM pg_stat_activity;]]</code> | * <code>[[SELECT * FROM pg_stat_activity;]]</code> | ||
+ | * <code>[[SELECT version();]]</code> | ||
+ | * <code>[[SELECT current user;]]</code> | ||
+ | |||
SELECT * FROM your_table_name; | SELECT * FROM your_table_name; | ||
[[ERROR: permission denied for table]] your_table_name | [[ERROR: permission denied for table]] your_table_name | ||
− | + | ||
− | |||
* <code>[[select]] current_setting('[[block_size]]');</code> | * <code>[[select]] current_setting('[[block_size]]');</code> |
Revision as of 13:24, 6 February 2023
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 * FROM your_table_name; ERROR: permission denied for table your_table_name
select current_setting('block_size');
- MySQL:
select user FROM mysql.user;
Related terms
- MongoDB:
db.YOUR_COLLETION_NAME.find ()
select count
select distinct
GRANT SELECT
ERROR: permission denied for relation your_table
See also
- 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: