SQL Query Generator Example
Use this simple online tool to generate SQL queries.
Query Type
Select query
SELECT
INSERT
UPDATE
DELETE
CREATE DATABASE
RENAME DATABASE
DROP DATABASE
CREATE TABLE
RENAME TABLE
DROP TABLE
Enter Query Information
SELECT
FROM
WHERE
[field names] as comma separated values
View Sample
SELECT Name, Age FROM Customers WHERE Gender = 'M';
Enter Query Information
INSERT INTO
(
)
VALUES
[field names] & [field values] as comma separated values
View Sample
INSERT INTO Customers (Name, Country, Address)
VALUES ('Lai Kassama', 'The Gambia', 'Brusubi Phase II');
Enter Query Information
UPDATE
SET
WHERE
[names & values] as comma separated values
View Sample
UPDATE Customers
SET Name = 'Lai Kasman', City= 'Serrekunda'
WHERE ID = 1;
Enter Query Information
DELETE FROM
WHERE
View Sample
DELETE FROM Users WHERE ID = 4;
Enter Query Information
CREATE DATABASE
View Sample
CREATE DATABASE Records;
Enter Query Information
ALTER DATABASE
MODIFY NAME =
View Sample
ALTER DATABASE Account MODIFY NAME = Accounts;
Enter Query Information
DROP DATABASE
View Sample
DROP DATABASE Students;
Enter Query Information
CREATE TABLE
(
)
[columns & datatype] as comma separated values
View Sample
CREATE TABLE Students (
Name TEXT NOT NULL,
Gender TEXT NOT NULL
);
Enter Query Information
EXEC SP_RENAME
View Sample
EXEC SP_RENAME 'Product','Products';
Enter Query Information
DROP TABLE
View Sample
DROP TABLE Users;
MS SQL Query Output
复制
MySQL Query Output
复制