The quires are used to implement the problems using any database engine using MS SQL server 2008. So here are some quires that will helpful in making any type of database. Lets we start it,
For adding new table by queries
Export, Update, Delete, Search, Select and Insert data within a Database
For adding new table by queries
USE CIITCLUSTERCREATING STUDENT TABLE USE ITU
CREATE TABLE Student
(ID INT NOT NULL PRIMARY KEY,
NAME NVARCHAR(500) NOT NULL ,
FName NVARCHAR(500) NOT NULL,
CITY NVARCHAR(500) NOT NULL,
AGE NVARCHAR(500) NOT NULL,
EMAIL NVARCHAR(500) NOT NULL)
CREATE TABLE STUDENT
(ID INT NOT NULL PRIMARY KEY,
NAME NVARCHAR(500) NOT NULL ,
FNAME NVARCHAR(500) NOT NULL ,
CITY NVARCHAR(500) NOT NULL ,
AGE NVARCHAR(500) NOT NULL ,
CINC NVARCHAR(500) NOT NULL ,
MARKS NVARCHAR(500) NOT NULL ,
DEPARTMENT NVARCHAR(500) NOT NULL ,
COURSEID NVARCHAR(500) NOT NULL)
Export, Update, Delete, Search, Select and Insert data within a Database
use ciitclusterThis post was published by author Ghulam Mujtaba
select * from Student where ID = 2;
select * from Student where City != 'vehari';
select * from Student where Age =23 or Age = 25;
select * from Student where Age in(20,25,28);
select * from Student where Age between 20 AND 30;
select * from Student where city LIKE('%V%');
select * from Student where EMAIL LIKE('%@%');
select * from Student where EMAIL NOT LIKE('%@%');
select * from Student where Name LIKE '[NAD]%';
select * from Student where Name NOT LIKE '[NAD]%';
select * from Student where (city = 'Vehari' OR city = 'Multan') AND Age < 25;
Post A Comment:
0 comments: