原文:sql server 判断是否存在数据库,表,列,视图1 判断数据库是否存在if exists (select * from sys.databases where name = '数据库名')drop database [数据库名]2 判断表是否存在if exists (select * f...
分类:
数据库 时间:
2014-07-02 14:43:14
阅读次数:
247
/*1.创建数据库*/create database if not exists test_01;/*2.查询所有数据库*/show databases;/*3.使用数据库 */use test_01;/*4.创建表*/create table if not exists BaseUser( ...
分类:
数据库 时间:
2014-07-02 14:11:25
阅读次数:
194
判断数据库if exists(select 1 from sys.databases where name=N'[数据库名]')判断表if exists (select 1 from dbo.sysobjects where id = object_id(N'[dbo].[表名]') and obj...
分类:
数据库 时间:
2014-06-28 12:39:23
阅读次数:
251
使用Android中自带的SQLiteOpenHelper可以完成数据库的创建与管理,但有两点局限:(1)数据库创建在内存卡中,大小受限,创建位置位于/data/data/应用程序名/databases中(可使用Eclispe的DDMS查看)。(2)如果无法获取Root权限,则无法直接查看创建的数据...
分类:
移动开发 时间:
2014-06-25 21:31:53
阅读次数:
343
向python进军。。。。。。运行所需环境:python,MySQLdb贴下自己写的关于sql备份的python脚本:#!/usr/bin/envpythonimportMySQLdbimportosimporttimedataList=[]remoteAddr=‘xxxx‘user=‘root‘password=‘xxxx‘dbConnect=MySQLdb.connect(%s,%s,%s)%(remoteAddr,user,password)cu..
分类:
数据库 时间:
2014-06-25 06:24:30
阅读次数:
265
1 判断数据库是否存在if exists (select * from sys.databases where name = '数据库名')drop database [数据库名]2 判断表是否存在if exists (select * from sysobjects where id = obje...
分类:
数据库 时间:
2014-06-24 10:20:17
阅读次数:
248
There are two types of Standby databases:
1, Physical standby database
block-for-block basis
the physically identical with the primary database
user recovery technology
2, Logical standby databa...
分类:
其他好文 时间:
2014-06-22 08:35:53
阅读次数:
355
一、数据库操作 1、查看当前存在的所有数据库 mysql>show databases; 2、切换当前使用数据库 mysql>use test 3、授权 mysql>grant all on 数据库名.* to 用户名@主机名 4、创建数据库 mysql>create...
分类:
数据库 时间:
2014-06-20 19:33:51
阅读次数:
209
一、查看MySQL中的所有数据库 show databases;二、查看当前正在使用的数据库 select database();三、查看当前数据库中的所有表 show tables;四、查看表结构 describe employees; 其中employees为表名五、显示创建表语句 ...
分类:
数据库 时间:
2014-06-20 17:09:27
阅读次数:
223
进入linux系统root>/usr/bin/mysql-urootmysql>showdatabases;#查看数据库mysql>usetesttable;#testtable为所要查看的库,应用数据库mysql>showtables;#查看所有表mysql>descabc_table#查看表结构mysql>createtableabc(>idintnotnullprimarykey,>`type..
分类:
数据库 时间:
2014-06-17 18:17:46
阅读次数:
233