Archived
The logo file doesn't show inside my notebook unless I add `blob/master/` within the path. The path which works on my machine is: `https://github.com/Microsoft/azuredatastudio/blob/master/samples/notebookSamples/Graphics/AzureDataStudioLogo.png?raw=true`
14 KiB
14 KiB
In [1]:
select
'Hello SQL World' as [Greetings],
@@servername as [Server Name],
datename(weekday,getutcdate()) as [Today]In [7]:
select top 5 * from sys.dm_exec_session_wait_stats order by wait_time_ms descOut [7]:
(5 rows affected)
Total execution time: 00:00:00.163
| session_id | wait_type | waiting_tasks_count | wait_time_ms | max_wait_time_ms | signal_wait_time_ms |
|---|---|---|---|---|---|
| 59 | ASYNC_NETWORK_IO | 24 | 389 | 347 | 0 |
| 57 | PREEMPTIVE_XE_GETTARGETSTATE | 9 | 160 | 102 | 0 |
| 57 | ASYNC_NETWORK_IO | 323 | 38 | 2 | 10 |
| 58 | MEMORY_ALLOCATION_EXT | 5066 | 25 | 0 | 0 |
| 60 | PAGEIOLATCH_SH | 30 | 11 | 0 | 0 |
In [1]:
select top 10 * from sys.databasesIn [1]:
set nocount on;
use WideWorldImporters;
declare @i int;
set @i = 1;
select @i [Value of @i], db_name() as [MyDatabaseName]In [1]:
select @i [Value of @i], db_name() as [MyDatabaseName]In [1]:
declare @i int;
select @i [Value of @i], db_name() as [MyDatabaseName]In [1]:
%%lang_python
print ("Hello World")STDOUT message(s) from external script:
Hello World
Total execution time: 00:00:21.211
In [1]:
--Server basics
SELECT
getutcdate() as DateRun,
db_name() as DatabaseName,
serverproperty('ServerName') as ServerName,
serverproperty('InstanceName') as InstanceName,
serverproperty('ComputerNamePhysicalNetBIOS') as PhysicalName,
serverproperty('Edition') as Edition,
serverproperty('ProductMajorVersion') as MajorVersion,
serverproperty('ProductMinorVersion') as MinorVersion
--Databases
SELECT *
from sys.databasesIn [1]:
DECLARE @i INT, @c varchar(26);
SELECT @i = 65, @c = '';
WHILE (@i < 93)
BEGIN
SELECT @c = concat(@c,CHAR(@i))
SET @i = @i + 1
END
SELECT @c as "Letters", len(@c) as "Count"In [1]:
DROP TABLE IF EXISTS [dbo].[MyNotebookTable]
CREATE TABLE [dbo].[MyNotebookTable]
(
[Id] INT IDENTITY NOT NULL PRIMARY KEY, -- Primary Key column
[FirstValue] NVARCHAR(50) NOT NULL,
[SecondValue] NVARCHAR(50) NOT NULL
);
PRINT 'Success: Created MyNotebookTable'
In [1]:
raiserror('Something bad happened!',0,1) with nowait;
waitfor delay '00:00:05'
raiserror('Something bad happened... again!',0,1) with nowait;