eBook - ePub
Netezza SQL
Tom Coffing, Mike Larkins
This is a test
Compartir libro
- 683 páginas
- English
- ePUB (apto para móviles)
- Disponible en iOS y Android
eBook - ePub
Netezza SQL
Tom Coffing, Mike Larkins
Detalles del libro
Vista previa del libro
Índice
Citas
Información del libro
This book contains nearly 700 pages of brilliant Netezza examples ranging from simple commands to advanced procedures. Netezza SQL, like all others in the Genius Series, guides readers in a clear and logical manner using pictures and real-life examples. This book is a must-have for any Netezza environment.
Preguntas frecuentes
¿Cómo cancelo mi suscripción?
¿Cómo descargo los libros?
Por el momento, todos nuestros libros ePub adaptables a dispositivos móviles se pueden descargar a través de la aplicación. La mayor parte de nuestros PDF también se puede descargar y ya estamos trabajando para que el resto también sea descargable. Obtén más información aquí.
¿En qué se diferencian los planes de precios?
Ambos planes te permiten acceder por completo a la biblioteca y a todas las funciones de Perlego. Las únicas diferencias son el precio y el período de suscripción: con el plan anual ahorrarás en torno a un 30 % en comparación con 12 meses de un plan mensual.
¿Qué es Perlego?
Somos un servicio de suscripción de libros de texto en línea que te permite acceder a toda una biblioteca en línea por menos de lo que cuesta un libro al mes. Con más de un millón de libros sobre más de 1000 categorías, ¡tenemos todo lo que necesitas! Obtén más información aquí.
¿Perlego ofrece la función de texto a voz?
Busca el símbolo de lectura en voz alta en tu próximo libro para ver si puedes escucharlo. La herramienta de lectura en voz alta lee el texto en voz alta por ti, resaltando el texto a medida que se lee. Puedes pausarla, acelerarla y ralentizarla. Obtén más información aquí.
¿Es Netezza SQL un PDF/ePUB en línea?
Sí, puedes acceder a Netezza SQL de Tom Coffing, Mike Larkins en formato PDF o ePUB, así como a otros libros populares de Informatik y Data-Warehousing. Tenemos más de un millón de libros disponibles en nuestro catálogo para que explores.
Información
Categoría
InformatikCategoría
Data-WarehousingChapter 1 – Basic SQL Functions
"Kites rise highest against the wind – not with it."
Sir Winston Churchill
Introduction
The Student_Table above will be used
in our early SQL Examples
in our early SQL Examples
This is a pictorial of the Student_Table which we will use to present some basic examples of SQL and get some hands-on experience with querying this table. This book attempts to show you the table, show you the query, and show you the result set.
SELECT * (All Columns) in a Table
SELECT *
FROM Student_Table ;
FROM Student_Table ;
Mostly every SQL statement will consist of a SELECT and a FROM. You SELECT the columns you want to see on your report and an Asterisk (*) means you want to see all columns in the table on the returning answer set!
Fully Qualifying a Database, Schema and Table
To refer to objects in other databases on the Netezza system, you must use three-level naming, which consists of the database (also referred to as catalog name), the schema (which is the name of the database owner), and the object (table, view or synonym). The last example (Sales..Dept) is a convenient way of specifying a fully qualified object name. The system supplies the schema name by internally inserting the current schema name.
SELECT Specific Columns in a Table
SELECT First_Name
,Last_Name
,Class_Code
,Grade_Pt
FROM Student_Table ;
Column names must be separated by commas. The next page will show perfect syntax, which will capitalize keywords and place each column on its own line.
Commas in the Front or Back?
Commas in the front (example 1) is Tera-Tom's recommendation to writing, but the next page is an even better example for a company standard. Both queries above produce the same answer set and have the same performance.
Using Good Form
SELECT First_Name,
Last_Name,
Class_Code,
Grade_Pt
FROM Student_Table ;
This is a great way to show the columns you are selecting from the Table_Name. Let me show you an even better technique!
Using the Best Form for Writing SQL
Why is the example on the right better even though they are functionally equivalent?
Place your Commas in front for better Debugging Capabilities
Having commas in front to separate column names makes it easier to debug
Sort the Data with the ORDER BY Keyword
Rows typically come back to the report in random order. To order the result set, you must use an ORDER BY. When you order by a column, it will order in ASCENDING order by default. This is called the Major Sort!
ORDER BY Defaults to Ascending
When you use the ORDER BY statement, it will default to ascending order, but you can change that if you like. I will show you how in a few pages down.
Use the Name or the Number in your ORDER BY Statement
The ORDER BY can use a number to represent the sort column. The numbe...