-- create a table
CREATE TABLE students (
id INTEGER PRIMARY KEY,
name TEXT NOT NULL,
gender TEXT NOT NULL
);
-- insert some values
INSERT INTO students VALUES (1, 'Ryan', 'M');
INSERT INTO students VALUES (2, 'Joanna', 'F');
-- fetch some values
SELECT * FROM students WHERE gender = 'F';
-- INIT database
CREATE TABLE Product (
ProductID INT IDENTITY(1, 1),
Name VARCHAR(100),
Description VARCHAR(255)
);
INSERT INTO Product(Name, Description) VALUES ('Entity Framework Extensions', 'Use <a href="https://[Log in to view URL]" target="_blank">Entity Framework Extensions</a> to extend your DbContext with high-performance bulk operations.');
INSERT INTO Product(Name, Description) VALUES ('Dapper Plus', 'Use <a href="https://[Log in to view URL]" target="_blank">Dapper Plus</a> to extend your IDbConnection with high-performance bulk operations.');
INSERT INTO Product(Name, Description) VALUES ('C# Eval Expression', 'Use <a href="https://[Log in to view URL]" target="_blank">C# Eval Expression</a> to compile and execute C# code at runtime.');
-- QUERY database
SELECT * FROM Product;
SELECT * FROM Product WHERE ProductID = 1;
-- Make case sensitive the search , collate after the expression
SELECT Name FROM Product where Name= "c# Eval Expression" or Name = "Dapper plus" ;
-- Make case sensitive the search , collate after the expression
--SELECT Count(*) FROM Product where Name= "c# Eval Expression" COLLATE SQL_Latin1_General_CP1_CS_AS or Name = "Dapper plus" COLLATE SQL_Latin1_General_CP1_CS_AS ;
SELECT Count(*) FROM Product where Name= "c# Eval Expression" or Name = "Dapper Plus" ;
To embed this project on your website, copy the following code and paste it into your website's HTML: