ReSharper 2025.1 Help

Predefined Live Templates for SQL / NoSQL

This topic lists all predefined live templates for SQL / NoSQL in ReSharper 2025.1. For more information about live templates, refer to Create source code using live templates.

Template

Details

ctx

Current file context

Scope Everywhere

Body

$CTX$

Parameters

  • CTX - Provides a list of items describing current context. This includes file name, containing type name, namespace name, etc.

nguid

Insert new GUID

Scope Everywhere

Body

$GUID$

Parameters

  • GUID - Generates a new Globally Unique Identifier (GUID)

col

new column definition

Scope Suitable SQL code

Body

$col$ $type$ $null$$END$

Parameters

  • col - Evaluates to the specified constant value

  • type - Evaluates to the specified constant value

  • null - Evaluates to the specified constant value

  • END - The caret position after the template is applied.

del

delete rows from a table

Scope Suitable SQL code

Body

delete from $table$ where $END$;

Parameters

  • table - no macro

  • END - The caret position after the template is applied.

first

select first N rows from a table

Scope Suitable SQL code

Body

select * from $table$ fetch first $size$ rows only$END$;

Parameters

  • table - no macro

  • size - Evaluates to the specified constant value

  • END - The caret position after the template is applied.

ins

insert rows into a table

Scope Suitable SQL code

Body

insert into $table$ ($columns$) values ($info$$END$);

Parameters

  • table - no macro

  • columns - no macro

  • info - no macro

  • END - The caret position after the template is applied.

lim

select first N rows from a table

Scope Suitable SQL code

Body

select * from $table$ limit $size$$END$;

Parameters

  • table - no macro

  • size - Evaluates to the specified constant value

  • END - The caret position after the template is applied.

sel

select all rows from a table

Scope Suitable SQL code

Body

select * from $table$$END$;

Parameters

  • table - no macro

  • END - The caret position after the template is applied.

selc

select the number of specific rows in a table

Scope Suitable SQL code

Body

select count(*) from $table$ $alias$ where $alias$.$END$;

Parameters

  • table - no macro

  • alias - Evaluates to the specified constant value

  • END - The caret position after the template is applied.

selw

select specific rows from a table

Scope Suitable SQL code

Body

select * from $table$ $alias$ where $alias$.$END$;

Parameters

  • table - no macro

  • alias - Evaluates to the specified constant value

  • END - The caret position after the template is applied.

tab

new table definition

Scope Suitable SQL code

Body

create table $table$ ( $col$ $type$ $null$$END$ );

Parameters

  • table - Evaluates to the specified constant value

  • col - Evaluates to the specified constant value

  • type - Evaluates to the specified constant value

  • null - Evaluates to the specified constant value

  • END - The caret position after the template is applied.

top

select first N rows from a table

Scope Suitable SQL code

Body

select top $size$ * from $table$$END$;

Parameters

  • table - no macro

  • size - Evaluates to the specified constant value

  • END - The caret position after the template is applied.

toprow

select first N rows from a table

Scope Suitable SQL code

Body

select * from $table$ where rownum <= $size$$END$;

Parameters

  • table - no macro

  • size - Evaluates to the specified constant value

  • END - The caret position after the template is applied.

upd

update values in a table

Scope Suitable SQL code

Body

update $table_name$ set $col$ = $value$ where $END$;

Parameters

  • table_name - no macro

  • col - no macro

  • value - no macro

  • END - The caret position after the template is applied.

view

new view definition

Scope Suitable SQL code

Body

create view $view$ as select * from $table$ $END$;

Parameters

  • view - Evaluates to the specified constant value

  • table - no macro

  • END - The caret position after the template is applied.

Last modified: 07 February 2025