unity3D--数据库

来源:互联网 发布:游戏角色设计软件 编辑:程序博客网 时间:2024/05/16 03:12
1逻辑表达式和运算符

运算符:= 等于、>大于、<小于、>=大于或等于、<=小于或等于、<>不等于、!非。

2、创建数据库:

create database 数据库名

3、利用数据库:

use 数据库名

4、建立数据表:

create table 表明 users
id int identity(自动增涨)主键
name varchar(50)not null(不为空)
passwork varchar(10)(为空就什么都不写)

5、查询表中所有信息:

select * from users

6、插入一条数据:

insert into users( 表名,列名)valuses(‘’,‘’)
例:insert into users(name,password)valuses(‘张三’,‘369’)

7、批量插入:

insert into users(name,password)
select (‘列值’)union
select (‘列值’)union
例:insert into users(表名,列名)
select (‘五五’)union
select (‘六六’)union
select (‘七七’)
(*在结束批量插入的时候,不要再加入union)

8、更新一条数据:

updata users set name=‘表名’ where id=‘数据’

9、删除一条数据:

delete from users where name=‘表名’

10、删除数据库:

drop database 数据库名

11、删除表:

drop table 表名

跟多精彩请关注:http://www.gopedu.com/

0 0
原创粉丝点击