Mysql 视图可以通过使用 AND、OR 和 NOT 等逻辑运算符的组合来创建。可以借助以下示例进行说明 -示例mysql> Create or Replace View Info AS select ID, Name,
Mysql 视图可以通过使用 AND、OR 和 NOT 等逻辑运算符的组合来创建。可以借助以下示例进行说明 -
mysql> Create or Replace View Info AS select ID, Name, Address , Subject FROM Student_info WHERE (Subject = 'Computers' AND ADDRESS = 'Delhi') OR (Subject = 'History' AND Address = 'Amritsar');
Query OK, 0 rows affected (0.11 sec)
mysql> Select * from Info;
+------+-------+---------+-----------+
| ID | Name | Address | Subject |
+------+-------+---------+-----------+
| 133 | Mohan | Delhi | Computers |
+------+-------+---------+-----------+
1 row in set (0.00 sec)
--结束END--
本文标题: 在创建 MySQL 视图时如何使用逻辑运算符组合?
本文链接: https://lsjlt.com/news/437306.html(转载时请注明来源链接)
有问题或投稿请发送至: 邮箱/279061341@qq.com QQ/279061341
2024-10-23
2024-10-22
2024-10-22
2024-10-22
2024-10-22
2024-10-22
2024-10-22
2024-10-22
2024-10-22
2024-10-22
回答
回答
回答
回答
回答
回答
回答
回答
回答
回答
0