Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
925 views

Netezza Commands

This document lists SQL commands for interacting with a PostgreSQL database. It describes commands for connecting to databases, running queries, describing schema objects like tables and views, setting options, and more. Key commands include \c to connect, \d to describe objects, \d{t} to list tables, \i to run queries from a file, \q to quit, and \? for help on syntax.

Uploaded by

Rajkumar Jeyaraj
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
925 views

Netezza Commands

This document lists SQL commands for interacting with a PostgreSQL database. It describes commands for connecting to databases, running queries, describing schema objects like tables and views, setting options, and more. Key commands include \c to connect, \d to describe objects, \d{t} to list tables, \i to run queries from a file, \q to quit, and \? for help on syntax.

Uploaded by

Rajkumar Jeyaraj
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

\a toggle between unaligned and aligned mode \act show current active sessions \c[onnect] [dbname [user] [password]]

connect to new database (currently 'RJEYARAJ_DB') \C <title> HTML table title \copy ... perform SQL COPY with data stream to the client machine \d <table> describe table (or view, index, sequence, synonym) \d{t v i s e x} list tables/views/indices/sequences/temp tables/external tables \d{m y} list materialized views/synonyms \dS{t v i s} list system tables/views/indexes/sequences \dM{t v i s} list system management tables/views/indexes/sequences \dp <name> list user permissions \dpu <name> list permissions granted to a user \dpg <name> list permissions granted to a group \dgp <name> list grant permissions for a user \dgpu <name> list grant permissions granted to a user \dgpg <name> list grant permissions granted to a group \d{u U} list users/User Groups \d{g G Gr} list groups/Group Users/Resource Group Users \da[+] [name] list aggregates, + for additional fields \dd [object] list comment for object \df[+] [name] list functions, + for additional fields \dl[+] [name] list libraries, + for additional fields \do list operators \dT list data types \e [file] edit the current query buffer or [file] with external editor \echo <text> write text to stdout \f <sep> change field separator \g [file] send query to backend (and results in [file] or pipe) \h [cmd] help on syntax of sql commands, * for all commands \H toggle HTML mode (currently off) \i <file> read and execute queries from <file> \l list all databases \o [file] send all query results to [file], or pipe \p show the content of the current query buffer \pset <opt> set table output <opt> = {format border expanded fieldsep null recordsep tuples_only title tableattr pager} \q quit nzsql \qecho <text> write text to query output stream (see \o) \r reset (clear) the query buffer \s [file] print history or save it in [file] \set <var> <value> set internal variable \t show only rows (currently off) \time print time taken by queries \T <tags> HTML table tags \unset <var> unset (delete) internal variable \w <file> write current query buffer to a <file> \x toggle expanded output (currently off) \! [cmd] shell escape or command

You might also like