Mysql 常用 SQL 语句集锦 基础篇 //查询时间,友好提示 $sql = "select date_format(create_time, '%Y-%m-%d') as day from table_name"; //int 时间戳类型 $sql = "select from_unixtime(create_time, '%Y-%m-%d') as day from table_name"; //一个sql返回多个总数 $sql = "select…
花点时间整理下sql基础,温故而知新.文章的demo来自oracle自带的dept,emp,salgrade三张表.解锁scott用户,使用scott用户登录就可以看到自带的表. #使用oracle用户登录linux [oracle@localhost ~]$ sqlplus / as sysdba; ...... SQL> alter user scott account unlock: 四大语句 DQL语句--select DML语句--insert,upate,delete等(关键…
Mysql 常用 SQL 语句集锦 基础篇 //查询时间,友好提示 $sql = "select date_format(create_time, '%Y-%m-%d') as day from table_name"; //int 时间戳类型 $sql = "select from_unixtime(create_time, '%Y-%m-%d') as day from table_name"; //一个sql返回多个总数 $sql = "select…
转载自Cracer,标题:<渗透常用SQL注入语句大全>,链接http://www.xxxx.com/?p=2226 1.判断有无注入点 整形参数判断 1.直接加' 2.and 1=1 3. and 1=2 如果1.3运行异常 2正常就存在注入字符型判断 1.直接加' 2.and '1'='1' 3. and '1'='2'搜索型: 关键字%' and 1=1 and '%'='% 关键字%' and 1=2 and '%'='% 如果1.3运行异常 2正常就存在注入 2.猜表一般的表的名称无…
sqlserver2005前: --分组取最大最小常用sql--测试环境if OBJECT_ID('tb') is not null drop table tb;gocreate table tb( col1 int, col2 int, Fcount int)insert into tbselect 11,20,1 union allselect 11,22,1 union allselect 11,23,2 union allselect 11,24,5 union allselect 12…
mysql学习笔记-常用命令 常用sql: SHOW VARIABLES LIKE 'character%';查看字符集SHOW VARIABLES LIKE 'collation_%';show engines;查看引擎show databases; 查看数据库 show tables; desc table_name; GRANT ALL PRIVILEGES ON *.* TO 'guming'@'localhost' IDENTIFIED BY 'guming' WITH GRANT O…
Oracle EBS DBA常用SQL - 安装/补丁 检查应用补丁有没有安装:select bug_number,last_update_date from ad_bugs where bug_number='&bug_num'; 检查安装了哪些语言:select nls_language,language_code,installed_flag from fnd_languages where installed_flag in ('I','B'); 检查应用有没有安装:SELECT SUB…
剑指Offer--常用SQL语句.存储过程和函数 常用SQL语句 1.在MySQL数据库建立多对多的数据表关系 2.授权.取消授权 grant.revoke grant select, insert, update, delete on testdb.* to common_user@'%': revoke all on *.* from dba@localhost; create user guest@localhost identified by '123456': grant select…
GP数据库 常用SQL语句 --1,查看列名以及类型 select upper(column_name) ,data_type from information_schema.columns where table_schema='ods_hs08' and lower(table_name)=lower('T_ods_hs08_secumreal'); --2,查看表名剔除分区表名 select a.tablename from pg_tables a where a.schemaname='…
常用sql语句总结(二)(更新数据,序列,创建数据表,约束,注释) 一. 增 INSERT INTO 数据表(字段,字段,-) VALUES(值,值-); INSERT INTO emp(empno,ename,job,mgr,date,sal,comm,deptno) VALUES(1001,'张三','班长',8000,SYSDATE|NOW(),3000,null,20) 二. 修 UPDATE 数据表 SET 字段 = 值,-.. WHERE 过滤条件; UPDATE emp SET s…