SQL Server 2012 |
MySQL 5.5 |
|
1 | use master;select * from sys.databases; | show databases;
|
2 | create database yourDatabaseName; | Create database yourDatabaseName;
|
3 | use yourDatabaseName; | use yourDatabaseName;
|
4 | select * from sys.tables; | show tables;
|
5 | create table yourTableName(
tablesPrimaryKey varchar(10) primary key, field1 varchar(10),field2 smallint, field3…. );
|
create table yourTableName( tablesPrimaryKey varchar(4) primary key, field2 varchar(10), field3 smallint(10),… );
|
6 | exec sp_help yourTableName; |
Describe yourTableName;
|
7 | truncate table yourTableName;
|
Truncate table yourTableName; |
8 | insert into yourTableName values (‘xyz’,‘abc’, 123,…); |
insert into yourTableName values (“xyz”,”abc”,123,…); |
As you can see, the statements are almost identical and are pretty self explanatory. No wonder, they are SeQueL afterall! E.F.Codd and Peter Chen will be happy to see how effective and easy to use/learn the tools and our software turned out to be.