Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
SQL_BASIC
--Sql Server 2014 Express Edition --Batches are separated by 'go' select @@version as 'sql server version' --Sql Server 2014 Express Edition --Batches are separated by 'go' select @@version as 'sql server version' CREATE TABLE Persons_Info ( PersonID int, LastName varchar(255), FirstName varchar(255), Bloodtype varchar(10), Contact_Info varchar(20), Address varchar(255), City varchar(255), State varchar(255), Country varchar(255) ); Insert into persons_info(PersonID, LastName, FirstName, Bloodtype, Contact_Info, Address, City, State, Country) values (001, 'N', 'kaushik', 'B+ve', '+910000000000', 'Magarpatta City','Pune','Maharashtra','India') select * from Persons_info Insert into persons_info(PersonID, LastName, FirstName, Bloodtype, Contact_Info, Address, City, State, Country) values (002, 'Doe', 'john', 'AB+ve', '+911000000000', 'Austin Main Town','Austin','Texas','United States') Insert into persons_info(PersonID, LastName, FirstName, Bloodtype, Contact_Info, Address, City, State, Country) values (003, 'Alexander', 'john', 'AB-ve', '+910100000000', 'Los Santos Airport','Los Santos','Los Angeles','United States') Insert into persons_info(PersonID, LastName, FirstName, Bloodtype, Contact_Info, Address, City, State, Country) values (004, 'Michael', '', 'AB-ve', '+910010000000', 'Los Santos Airport','Los Santos','Los Angeles','United States') Insert into persons_info(PersonID, LastName, FirstName, Bloodtype, Contact_Info, Address, City, State, Country) values (005, 'Trevor', '', 'AB-ve', '+910001000000', 'Los Santos Airport','Los Santos','Los Angeles','United States') select * from persons_info where Country ='United States' Insert into persons_info(PersonID, LastName, FirstName, Bloodtype, Contact_Info, Address, City, State, Country) values (006, 'Rockstar', '', 'AB-ve', '+910001000000', 'Los Santos Airport','Los Santos','Los Angeles','United States') Insert into persons_info(PersonID, LastName, FirstName, Bloodtype, Contact_Info, Address, City, State, Country) values (007, 'Donaled', '', 'AB-ve', '+910001000000', 'Los Santos Airport','Los Santos','Los Angeles','United States') Insert into persons_info(PersonID, LastName, FirstName, Bloodtype, Contact_Info, Address, City, State, Country) values (008, 'John', '', 'AB-ve', '+910001000000', 'Los Santos Airport','Los Santos','Los Angeles','United States') select Top 5 * from persons_info where Country ='United States' select Top 5 * from persons_info where Country ='India'
run
|
edit
|
history
|
help
0
h
QUAN LY MAYBAY
StackOverflow_53753663
student
exp8
SQLERROR
QLSV
SaLLa
Empresa
lab5