Implementa una MySQL Void Query che non fa nulla
Creiamo innanzitutto una tabella:
mysql> create table DemoTable(Name varchar(100));
Query OK, 0 rows affected (0.47 sec)
Inserisci alcuni record nella tabella utilizzando il comando di inserimento:
mysql> insert into DemoTable values('Chris');
Query OK, 1 row affected (0.13 sec)
mysql> insert into DemoTable values('Sam');
Query OK, 1 row affected (0.11 sec)
mysql> insert into DemoTable values('Robert');
Query OK, 1 row affected (0.37 sec)
mysql> insert into DemoTable values('Mike');
Query OK, 1 row affected (0.09 sec)
Visualizza tutti i record dalla tabella utilizzando l'istruzione select :
mysql> select *from DemoTable;
Ciò produrrà il seguente output:
+--------+
| Name |
+--------+
| Chris |
| Sam |
| Robert |
| Mike |
+--------+
4 rows in set (0.00 sec)
Di seguito è riportata la query per MySQL void:
mysql> select *from DemoTable limit 0;
Empty set (0.00 sec)
Sopra, il risultato è Set vuoto e la query non fa nulla.