Этот баннер — требование Роскомнадзора для исполнения 152 ФЗ.
«На сайте осуществляется обработка файлов cookie, необходимых для работы сайта, а также для анализа использования сайта и улучшения предоставляемых сервисов с использованием метрической программы Яндекс.Метрика. Продолжая использовать сайт, вы даёте согласие с использованием данных технологий».
Политика конфиденциальности
|
|
|
Почему в 2000 SQL в функциях нельзя использовать времянки? :(
|
|||
|---|---|---|---|
|
#18+
Так правильно? переходить на тип данных Table ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 24.10.2001, 15:00 |
|
||
|
Почему в 2000 SQL в функциях нельзя использовать времянки? :(
|
|||
|---|---|---|---|
|
#18+
Можно, просто синтаксис немного другой. Например вот так: CREATE FUNCTION tst1 () RETURNS int AS BEGIN declare @tst2 TABLE (Eid int primary key) insert into @tst2 VALUES(1) return 11 END ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 24.10.2001, 15:33 |
|
||
|
Почему в 2000 SQL в функциях нельзя использовать времянки? :(
|
|||
|---|---|---|---|
|
#18+
Выдержка из хелпа: Use table variables instead of temporary tables, whenever possible. table variables provide the following benefits: A table variable behaves like a local variable. It has a well-defined scope, which is the function, stored procedure, or batch in which it is declared. Within its scope, a table variable may be used like a regular table. It may be applied anywhere a table or table expression is used in SELECT, INSERT, UPDATE, and DELETE statements. However, table may not be used in the following statements: INSERT INTO table_variable EXEC stored_procedure SELECT select_list INTO table_variable statements. table variables are cleaned up automatically at the end of the function, stored procedure, or batch in which they are defined. table variables used in stored procedures result in fewer recompilations of the stored procedures than when temporary tables are used. Transactions involving table variables last only for the duration of an update on the table variable. Thus, table variables require less locking and logging resources. А временные таблицы нельзя использовать в функциях очевидно из-за того что для их изменения необходимо вести транзакции. ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 25.10.2001, 06:40 |
|
||
|
|

start [/forum/topic.php?fid=46&msg=32015961&tid=1825206]: |
0ms |
get settings: |
7ms |
get forum list: |
15ms |
check forum access: |
3ms |
check topic access: |
3ms |
track hit: |
35ms |
get topic data: |
8ms |
get forum data: |
2ms |
get page messages: |
34ms |
get tp. blocked users: |
1ms |
| others: | 238ms |
| total: | 346ms |

| 0 / 0 |
