|
Надо добавить условия при создание новый таблицу
|
|||
---|---|---|---|
#18+
У меня есть 2 таблицы, и я создаю из них новую третью таблицу. Я не могу добавить условие к запросу. Таблица 1- test1 Таблица 2- test2 Запрос CREATE TABLE test3 AS (SELECT test1.id, test1.adress, test2.gorod, test1.minut * test2.den //------- FROM test1 INNER JOIN test2 ON test1.id = test2.id) в test2 есть поля vremya, если vremya=1 тогда test1.minut * test2.den, если vremya=0 тогда test1.minut * test2.noch if vremya==1 test1.minut * test2.den else if vremya==1 test1.minut * test2.noch ... |
|||
:
Нравится:
Не нравится:
|
|||
18.12.2021, 19:54 |
|
Надо добавить условия при создание новый таблицу
|
|||
---|---|---|---|
#18+
https://www.w3schools.com/sql/sql_case.asp Posted via ActualForum NNTP Server 1.5 ... |
|||
:
Нравится:
Не нравится:
|
|||
18.12.2021, 19:57 |
|
|
start [/forum/search_topic.php?author=%D0%92%D0%BE%D0%BF%D1%80%D0%BE%D1%81+%D0%BF%D0%BE+%D0%B0%D0%BF%D0%B5%D0%BA%D1%81%D1%83&author_mode=last_posts&do_search=1]: |
0ms |
get settings: |
9ms |
get forum list: |
12ms |
get settings: |
11ms |
get forum list: |
12ms |
check forum access: |
3ms |
check topic access: |
3ms |
track hit: |
154ms |
get topic data: |
11ms |
get forum data: |
2ms |
get page messages: |
38ms |
get tp. blocked users: |
1ms |
others: | 653ms |
total: | 909ms |
0 / 0 |