Esercitazione SQL

SQL HOME Introduzione SQL Sintassi SQL Seleziona SQL SQL Seleziona distinto SQL dove SQL e, o, no Ordina SQL per Inserisci SQL in Valori nulli SQL Aggiornamento SQL Elimina SQL SQL Seleziona in alto SQL Min e Max Conteggio SQL, media, somma Mi piace SQL Caratteri jolly SQL SQL In SQL tra Alias ​​SQL Join SQL Join interno SQL Join sinistro SQL SQL Right Join SQL Full Join SQL Self Join Unione SQL Raggruppamento SQL per SQL Avere SQL esiste SQL Qualsiasi, Tutti SQL Seleziona in Inserisci SQL in Seleziona Caso SQL Funzioni SQL Null Stored procedure SQL Commenti SQL Operatori SQL

Database SQL

SQL Crea DB SQL Drop DB DB di backup SQL SQL Crea tabella Tabella di rilascio SQL SQL Alter tabella Vincoli SQL SQL non nullo SQL unico Chiave primaria SQL Chiave esterna SQL Controllo SQL SQL predefinito Indice SQL Incremento automatico SQL Date SQL Viste SQL SQL Injection Hosting SQL Tipi di dati SQL

Riferimenti SQL

Parole chiave SQL Funzioni MySQL Funzioni di SQL Server Funzioni di accesso MS Riferimento rapido SQL

Esempi SQL

Esempi SQL Quiz SQL Esercizi SQL Certificato SQL

Funzione MS Access Format()

❮ Funzioni di MS Access

Esempio

Formatta un'espressione numerica in percentuale:

SELECT Format(0.5, "Percent") AS FormattedNum;

Definizione e utilizzo

La funzione Format() formatta un valore numerico con il formato specificato.

Sintassi

Format(value, format)

Valori dei parametri

Parameter Description
value Required. The numeric value to format
format Optional. The format to to use.
Format Description
General Number Indicates a number, without thousand separators
Currency Indicates currency, with thousand separators and two decimal places
Fixed Shows minimum one digit to the left of the decimal place and two digits to the right of the decimal place
Standard Shows the thousand separators + minimum one digit to the left of the decimal place, and two digits to the right of the decimal place
Percent Shows a percent value (with percent sign) and two digits to the right of the decimal place
Scientific Indicates scientific notation
Yes/No Shows No if value = 0 and Yes if value <> 0
True/False Shows False if value = 0 and True if value <> 0
On/Off Shows Off if value = 0 and On if value <> 0

Dettagli tecnici

Funziona in: Da Access 2000

Altri esempi

Esempio

Formatta la colonna "Prezzo" in valuta:

SELECT Format(Price, "Currency") AS FormattedPrice
FROM Products;

❮ Funzioni di MS Access