- Trending Categories
- Data Structure
- Operating System
- C Programming
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Create a table named “select” in SQL databases?
152 Lectures 16 hours
87 Lectures 5.5 hours
Since “select” is a reserved word in MySQL, we cannot create a table name with it. But, if you still want to create such a table, surround the word select with quote.
Let us first create a table −
mysql> create table `select` -> ( -> Number int -> ); Query OK, 0 rows affected (0.79 sec)
Insert some records in the table using insert command −
mysql> insert into `select` values(10); Query OK, 1 row affected (0.16 sec) mysql> insert into `select` values(20); Query OK, 1 row affected (0.11 sec) mysql> insert into `select` values(30); Query OK, 1 row affected (0.12 sec)
Display all records from the table using select statement −
mysql> select *from `select`;
This will produce the following output −
+--------+ | Number | +--------+ | 10 | | 20 | | 30 | +--------+ 3 rows in set (0.00 sec)
- Create table SQL query in SAP HANA
- How to create a temporary MySQL table in a SELECT statement without a separate CREATE TABLE?
- MySQL query error with a table named “order”?
- How to create and use a named pipe in Python?
- How to executes an SQL SELECT statement in a JSP?
- MySQL select query to select rows from a table that are not in another table?
- Create a table in HTML
- Randomly SELECT distinct rows in a MySQL table?
- INSERT INTO table if a table exists in MySQL else implement CREATE TABLE and create the table
- Select the table name as a column in a UNION select query with MySQL?
- Create MySQL query to create a table from an existing table?
- Load and unload a table in SAP HANA using SQL query
- Explain the difference between a table, view and synonym in SQL
- Create a table in MySQL that matches another table?
- Create User SQL in SAP HANA database