NZSQL utility is a command line tool of netezza. The NZSQL command is used to create database objects, run queries and manage the database. You can write the output of executed query to a file by using the NZSQL.
NZSQL syntax:
The syntax of NZSQL command is
NZSQL Options:
The NZSQL command line options are:
NZSQL Status Codes
The NZSQL command returns the following status codes
Recommended Reading:
Netezza Interview Questions
Netezza TwinFin Architecture
Netezza First_value Analytic Function
Netezza Lead Analytic Function
Netezza NZLOAD utility
If you like this article, then please share it or click on the google +1 button.
NZSQL syntax:
The syntax of NZSQL command is
nzsql [options] [dbname [user name][password]]
NZSQL Options:
The NZSQL command line options are:
| Option | Description |
|---|---|
| -c <query> | Runs only a single query |
| -d <dbname> | Database name[NZ_DATABASE] |
| -f <file name> | Executes queries from a file |
| -F <string> | Field separator. Default is '|' |
| -host <hostname> | Database server host |
| -i | Lists databases |
| -o <file name> | Sends query output to file name |
| -port <port> | Database server port |
| -pw <password> | User password |
| -R <string> | Record separator |
| -u <user name> | Database user name |
NZSQL Status Codes
The NZSQL command returns the following status codes
- 0 - Success on execution of the statement
- 1 - Syntax error, database problem etc.,
- 2 - Connection failures like bad database name, wrong user name or password, database down etc.,
- 3 - user canceled the execution of command by issuing Ctrl – C
Recommended Reading:
Netezza Interview Questions
Netezza TwinFin Architecture
Netezza First_value Analytic Function
Netezza Lead Analytic Function
Netezza NZLOAD utility
If you like this article, then please share it or click on the google +1 button.

Post a Comment