Questo browser non è più supportato.
Esegui l'aggiornamento a Microsoft Edge per sfruttare i vantaggi di funzionalità più recenti, aggiornamenti della sicurezza e supporto tecnico.
You must return the Name and Price columns from a table named Product in the Production schema. In the resulting rowset, you want the Name column to be named ProductName. Which of the following Transact-SQL statements should you use?
SELECT * FROM Product AS Production.Product;
SELECT Name AS ProductName, Price FROM Production.Product;
SELECT ProductName, Price FROM Production.Product;
You must retrieve data from a column that is defined as char(1). If the value in the column is a digit between 0 and 9, the query should return it as an integer value. Otherwise, the query should return NULL. Which function should you use?
CAST
NULLIF
TRY_CONVERT
You must return the Cellphone column from the Sales.Customer table. Cellphone is a varchar column that permits NULL values. For rows where the Cellphone value is NULL, your query should return the text 'None'. What query should you use?
SELECT ISNULL(Cellphone, 'None') AS Cellphone FROM Sales.Customer;
SELECT NULLIF(Cellphone, 'None') AS Cellphone FROM Sales.Customer;
SELECT CONVERT(varchar, Cellphone) AS None FROM Sales.Customer;
You must answer all questions before checking your work.
Questa pagina è stata utile?
Serve aiuto con questo argomento?
Provare a usare Ask Learn per chiarire o guidare l'utente in questo argomento?