Search
 
SCRIPT & CODE EXAMPLE
 

SQL

select query in mysql

SELECT * FROM `table_name`;
SELECT `col1`,`col2` FROM `table_name`;
SELECT `col1 as name`,`col2 as email` FROM `table_name`;
SELECT * FROM `table_name` WHERE id = '1';
Comment

select mysql

SELECT column_name(s) FROM table_name
Comment

SELECT in mysql

To select data from a table in MySQL, use the "SELECT" statement.

example:
Select all records from the "customers" table, and display the result object:

var mysql = require('mysql');

var con = mysql.createConnection({
  host: "localhost",
  user: "yourusername",
  password: "yourpassword",
  database: "mydb"
});

con.connect(function(err) {
  if (err) throw err;
  con.query("SELECT * FROM customers", function (err, result, fields) {
    if (err) throw err;
    console.log(result);
  });
});

SELECT * will return all columns
Comment

mysql SELECT

SELECT 
  `nachname` , `vorname` 
FROM testadressen
WHERE vorname = 'Fischer'
Comment

mysql select

SELECT * FROM table;
SELECT * FROM table1, table2;
SELECT field1, field2 FROM table1, table2;
SELECT ... FROM ... WHERE condition
SELECT ... FROM ... WHERE condition GROUP BY field;
SELECT ... FROM ... WHERE condition GROUP BY field HAVING condition2;
SELECT ... FROM ... WHERE condition ORDER BY field1, field2;
SELECT ... FROM ... WHERE condition ORDER BY field1, field2 DESC;
SELECT ... FROM ... WHERE condition LIMIT 10;
SELECT DISTINCT field1 FROM ...
SELECT DISTINCT field1, field2 FROM ...
Comment

MySQL SELECT

SELECT select_list
FROM table_name;
Comment

PREVIOUS NEXT
Code Example
Sql :: mysql find the row ites of the hoghest value at on column 
Sql :: SQL server datetime compare 
Sql :: mysql update set 
Sql :: export data from excel to sql server 
Sql :: sql compiler 
Sql :: phpmyadmin access denied 
Sql :: find below average salary in sql 
Sql :: what is a stored procedure 
Sql :: sql check if a record exists 
Sql :: insert into table with only identity column 
Sql :: bigquery function 
Sql :: import DB through mysql console 
Sql :: ssms keyboard shortcuts 
Sql :: kill mysqld_safe process mariadb 
Csharp :: how to make an object look at another unity 
Csharp :: how to make mouse invisible unity 
Csharp :: unity quit in edtor 
Csharp :: unity float from another script 
Csharp :: unity gameobject teleporting 
Csharp :: textmesh pro text unity 
Csharp :: c# if file exists 
Csharp :: change height of rect transform unity 
Csharp :: Retrieve url path 
Csharp :: clone gameobject unity c# 
Csharp :: hello world c 
Csharp :: c# int to bool 
Csharp :: unity c# get bool from another script 
Csharp :: set text in center wpf 
Csharp :: scenemanager c# 
Csharp :: open new window c# wpf 
ADD CONTENT
Topic
Content
Source link
Name
6+1 =