Mostrando entradas con la etiqueta SQL. Mostrar todas las entradas
Mostrando entradas con la etiqueta SQL. Mostrar todas las entradas

jueves, 27 de abril de 2017

Revising the Select Query I

Revising the Select Query 









Query all columns for all American cities in CITY with populations larger than 100000. The CountryCode for America is USA.
Input Format
The CITY table is described as follows:
select * from CITY where CITY.POPULATION >'100000' and COUNTRYCODE='USA';


****************************************
Query the names of all American cities in CITY with populations larger than 120000. The CountryCode for America is USA.

Input Format
The CITY table is described as follows:CITY.jpg
select CITY.NAME from CITY where CITY.POPULATION >'120000' and COUNTRYCODE='USA';


*********************************************
Query all columns (attributes) for every row in the CITY table.

Input Format
The CITY table is described as follows:CITY.jpg

SELECT * FROM CITY

********************************************************
Query all columns for a city in CITY with the ID 1661.

Input Format
The CITY table is described as follows:
SELECT * FROM CITY WHERE CITY.ID = '1661';

************************************************************************************


Query all attributes of every Japanese city in the CITY table. The COUNTRYCODE for Japan is JPN.

Input Format
The CITY table is described as follows:

SELECT * FROM CITY WHERE CITY.COUNTRYCODE='JPN';

***********************************************************************
Query the names of all the Japanese cities in the CITY table. The COUNTRYCODE for Japan is JPN.
Input Format
The CITY table is described as follows:
SELECT city.name FROM CITY WHERE CITY.COUNTRYCODE='JPN';

************************************************


Query a list of CITY and STATE from the STATION table.

Input Format
The STATION table is described as follows:
where LAT_N is the northern latitude and LONG_W is the western longitude.

SOLUTION:

           SELECT CITY,STATE from STATION;


Explanation:

    The question is that we have been asked to write a query that lists the CITY and STATION fields present in the table STATION.

viernes, 4 de noviembre de 2016

mysql workbrench

MySQL Workbrench es una fantastica herramienta, hasta ahora sin precedentes en MySQL extremadamente amigable y facil de usar




domingo, 31 de julio de 2016

REPORTS




Customer  Service and Conservation (CSC) :,,
,,
Sl. No.,BarCode Value,Form Name

CREATE TABLE CS_BARCODE
(
idCS INT,
FormId NVARCHAR(64) not null
FormName NVARCHAR(64) not null
CONSTRAINT pk_CS_id PRIMARY KEY(idCS)
);
GO

INSERT INTO dbo.CS_BARCODE
(idCS,FormId,FormName)
values (
1,'METCS0101','Full Maturity Release')

INSERT INTO dbo.CS_BARCODE
(idCS,FormId,FormName)
values (
2,'METCS0201','Partial Maturity Payment Ins.')

INSERT INTO dbo.CS_BARCODE
(idCS,FormId,FormName)
values (
3,'METCS0301','Request for Surrender')

INSERT INTO dbo.CS_BARCODE
(idCS,FormId,FormName)
values (
4,'METCS0401','Loan Application Form')

INSERT INTO dbo.CS_BARCODE
(idCS,FormId,FormName)
values (
5,'METCS0501','Medical Form - CSC')

INSERT INTO dbo.CS_BARCODE
(idCS,FormId,FormName)
values (
6,'METCS0601','Service Call Ckeck List')

INSERT INTO dbo.CS_BARCODE
(idCS,FormId,FormName)
values (
7,'METCS0701','Request to Change')

INSERT INTO dbo.CS_BARCODE
(idCS,FormId,FormName)
values (
8,'METCS0801','Application for Reinstatement - Juvenile')

INSERT INTO dbo.CS_BARCODE
(idCS,FormId,FormName)
values (
9,'METCS0901','Rider Change')

INSERT INTO dbo.CS_BARCODE
(idCS,FormId,FormName)
values (
10,'METCS1001','Mode & Others Change')

INSERT INTO dbo.CS_BARCODE
(idCS,FormId,FormName)
values (
11,'METCS1101','FA Change')

INSERT INTO dbo.CS_BARCODE
(idCS,FormId,FormName)
values (
12,'METCS1201','Plan/Term Change')


INSERT INTO dbo.CS_BARCODE
(idCS,FormId,FormName)
values (
13,'METCS1301','Name/Signature/Age Change')


INSERT INTO dbo.CS_BARCODE
(idCS,FormId,FormName)
values (
14,'METCS1401','Beneficiary Change')


INSERT INTO dbo.CS_BARCODE
(idCS,FormId,FormName)
values (
15,'METCS1501','Duplicate Document')


INSERT INTO dbo.CS_BARCODE
(idCS,FormId,FormName)
values (
16,'METCS1601','Correspondence')


INSERT INTO dbo.CS_BARCODE
(idCS,FormId,FormName)
values (
17,'METCS1701','Reinstatement by Re-Date')

INSERT INTO dbo.CS_BARCODE
(idCS,FormId,FormName)
values (
18,'METCS1801','DPS Reinstatement - RINBY1')

INSERT INTO dbo.CS_BARCODE
(idCS,FormId,FormName)
values (
19,'METCS1901','Additional Documents')

INSERT INTO dbo.CS_BARCODE
(idCS,FormId,FormName)
values (
20,'METCS2001','Document Received')

INSERT INTO dbo.CS_BARCODE
(idCS,FormId,FormName)
values (
23,'METCS2901','Refund Form')

INSERT INTO dbo.CS_BARCODE
(idCS,FormId,FormName)
values (
22,'METCS2201','Document Received for Policy Cancelation')

INSERT INTO dbo.CS_BARCODE
(idCS,FormId,FormName)
values (
22,'METCS2201','Document Received for Policy Cancelation')

















jueves, 2 de julio de 2015

msfconsole command Backtrack 5

What happens when we execute the command  msfconsole, it cerates the following tables : 
this is the process of compilation begin:
ZENCONSULTORA COPYRIGHTS

root@bt:~# msfconsole
NOTICE:  CREATE TABLE will create implicit sequence "hosts_id_seq" for
serial column "hosts.id"
NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index
"hosts_pkey" for table "hosts"
NOTICE:  CREATE TABLE will create implicit sequence "clients_id_seq"
for serial column "clients.id"
NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index
"clients_pkey" for table "clients"
NOTICE:  CREATE TABLE will create implicit sequence "services_id_seq"
for serial column "services.id"
NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index
"services_pkey" for table "services"
NOTICE:  CREATE TABLE will create implicit sequence "vulns_id_seq" for
serial column "vulns.id"
NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index
"vulns_pkey" for table "vulns"
NOTICE:  CREATE TABLE will create implicit sequence "refs_id_seq" for
serial column "refs.id"
NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index
"refs_pkey" for table "refs"
NOTICE:  CREATE TABLE will create implicit sequence "notes_id_seq" for
serial column "notes.id"
NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index
"notes_pkey" for table "notes"
NOTICE:  CREATE TABLE will create implicit sequence
"wmap_targets_id_seq" for serial column "wmap_targets.id"
NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index
"wmap_targets_pkey" for table "wmap_targets"
NOTICE:  CREATE TABLE will create implicit sequence
"wmap_requests_id_seq" for serial column "wmap_requests.id"
NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index
"wmap_requests_pkey" for table "wmap_requests"
NOTICE:  CREATE TABLE will create implicit sequence
"workspaces_id_seq" for serial column "workspaces.id"
NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index
"workspaces_pkey" for table "workspaces"
NOTICE:  CREATE TABLE will create implicit sequence "events_id_seq"
for serial column "events.id"
NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index
"events_pkey" for table "events"
NOTICE:  CREATE TABLE will create implicit sequence "loots_id_seq" for
serial column "loots.id"
NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index
"loots_pkey" for table "loots"
NOTICE:  CREATE TABLE will create implicit sequence "users_id_seq" for
serial column "users.id"
NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index
"users_pkey" for table "users"
NOTICE:  CREATE TABLE will create implicit sequence "reports_id_seq"
for serial column "reports.id"
NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index
"reports_pkey" for table "reports"
NOTICE:  CREATE TABLE will create implicit sequence "tasks_id_seq" for
serial column "tasks.id"
NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index
"tasks_pkey" for table "tasks"
NOTICE:  CREATE TABLE will create implicit sequence "creds_id_seq" for
serial column "creds.id"
NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index
"creds_pkey" for table "creds"
NOTICE:  CREATE TABLE will create implicit sequence
"exploited_hosts_id_seq" for serial column "exploited_hosts.id"
NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index
"exploited_hosts_pkey" for table "exploited_hosts"
NOTICE:  CREATE TABLE will create implicit sequence
"report_templates_id_seq" for serial column "report_templates.id"
NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index
"report_templates_pkey" for table "report_templates"
NOTICE:  CREATE TABLE will create implicit sequence "campaigns_id_seq"
for serial column "campaigns.id"
NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index
"campaigns_pkey" for table "campaigns"
NOTICE:  CREATE TABLE will create implicit sequence
"email_templates_id_seq" for serial column "email_templates.id"
NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index
"email_templates_pkey" for table "email_templates"
NOTICE:  CREATE TABLE will create implicit sequence
"attachments_id_seq" for serial column "attachments.id"
NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index
"attachments_pkey" for table "attachments"
NOTICE:  CREATE TABLE will create implicit sequence
"email_addresses_id_seq" for serial column "email_addresses.id"
NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index
"email_addresses_pkey" for table "email_addresses"
NOTICE:  CREATE TABLE will create implicit sequence
"web_templates_id_seq" for serial column "web_templates.id"
NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index
"web_templates_pkey" for table "web_templates"
NOTICE:  CREATE TABLE will create implicit sequence "web_sites_id_seq"
for serial column "web_sites.id"
NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index
"web_sites_pkey" for table "web_sites"
NOTICE:  CREATE TABLE will create implicit sequence "web_pages_id_seq"
for serial column "web_pages.id"
NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index
"web_pages_pkey" for table "web_pages"
NOTICE:  CREATE TABLE will create implicit sequence "web_forms_id_seq"
for serial column "web_forms.id"
NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index
"web_forms_pkey" for table "web_forms"
NOTICE:  CREATE TABLE will create implicit sequence "web_vulns_id_seq"
for serial column "web_vulns.id"
NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index
"web_vulns_pkey" for table "web_vulns"
NOTICE:  CREATE TABLE will create implicit sequence
"imported_creds_id_seq" for serial column "imported_creds.id"
NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index
"imported_creds_pkey" for table "imported_creds"
NOTICE:  CREATE TABLE will create implicit sequence "tags_id_seq" for
serial column "tags.id"
NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index
"tags_pkey" for table "tags"
NOTICE:  CREATE TABLE will create implicit sequence "sessions_id_seq"
for serial column "sessions.id"
NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index
"sessions_pkey" for table "sessions"
NOTICE:  CREATE TABLE will create implicit sequence
"session_events_id_seq" for serial column "session_events.id"
NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index
"session_events_pkey" for table "session_events"
NOTICE:  CREATE TABLE will create implicit sequence "routes_id_seq"
for serial column "routes.id"
NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index
"routes_pkey" for table "routes"
NOTICE:  CREATE TABLE will create implicit sequence "api_keys_id_seq"
for serial column "api_keys.id"
NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index
"api_keys_pkey" for table "api_keys"
NOTICE:  CREATE TABLE will create implicit sequence "macros_id_seq"
for serial column "macros.id"
NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index
"macros_pkey" for table "macros"
NOTICE:  CREATE TABLE will create implicit sequence
"cred_files_id_seq" for serial column "cred_files.id"
NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index
"cred_files_pkey" for table "cred_files"
NOTICE:  CREATE TABLE will create implicit sequence "listeners_id_seq"
for serial column "listeners.id"
NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index
"listeners_pkey" for table "listeners"
NOTICE:  CREATE TABLE will create implicit sequence
"nexpose_consoles_id_seq" for serial column "nexpose_consoles.id"
NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index
"nexpose_consoles_pkey" for table "nexpose_consoles"
NOTICE:  CREATE TABLE will create implicit sequence "profiles_id_seq"
for serial column "profiles.id"
NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index
"profiles_pkey" for table "profiles"
NOTICE:  CREATE TABLE will create implicit sequence "mod_refs_id_seq"
for serial column "mod_refs.id"
NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index
"mod_refs_pkey" for table "mod_refs"
NOTICE:  CREATE TABLE will create implicit sequence
"vuln_details_id_seq" for serial column "vuln_details.id"
NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index
"vuln_details_pkey" for table "vuln_details"
NOTICE:  CREATE TABLE will create implicit sequence
"host_details_id_seq" for serial column "host_details.id"
NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index
"host_details_pkey" for table "host_details"
NOTICE:  CREATE TABLE will create implicit sequence
"vuln_attempts_id_seq" for serial column "vuln_attempts.id"
NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index
"vuln_attempts_pkey" for table "vuln_attempts"
NOTICE:  CREATE TABLE will create implicit sequence
"module_details_id_seq" for serial column "module_details.id"
NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index
"module_details_pkey" for table "module_details"
NOTICE:  CREATE TABLE will create implicit sequence
"module_authors_id_seq" for serial column "module_authors.id"
NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index
"module_authors_pkey" for table "module_authors"
NOTICE:  CREATE TABLE will create implicit sequence
"module_mixins_id_seq" for serial column "module_mixins.id"
NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index
"module_mixins_pkey" for table "module_mixins"
NOTICE:  CREATE TABLE will create implicit sequence
"module_targets_id_seq" for serial column "module_targets.id"
NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index
"module_targets_pkey" for table "module_targets"
NOTICE:  CREATE TABLE will create implicit sequence
"module_actions_id_seq" for serial column "module_actions.id"
NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index
"module_actions_pkey" for table "module_actions"
NOTICE:  CREATE TABLE will create implicit sequence
"module_refs_id_seq" for serial column "module_refs.id"
NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index
"module_refs_pkey" for table "module_refs"
NOTICE:  CREATE TABLE will create implicit sequence
"module_archs_id_seq" for serial column "module_archs.id"
NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index
"module_archs_pkey" for table "module_archs"
NOTICE:  CREATE TABLE will create implicit sequence
"module_platforms_id_seq" for serial column "module_platforms.id"
NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index
"module_platforms_pkey" for table "module_platforms"
NOTICE:  CREATE TABLE will create implicit sequence
"exploit_attempts_id_seq" for serial column "exploit_attempts.id"
NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index
"exploit_attempts_pkey" for table "exploit_attempts"
[*] The initial module cache will be built in the background, this can
take 2-5 minutes...

     ,           ,
    /             \
   ((__---,,,---__))
      (_) O O (_)_________
         \ _ /            |\
          o_o \   M S F   | \
               \   _____  |  *
                |||   WW|||
                |||     |||


       =[ metasploit v4.5.0-dev [core:4.5 api:1.0]
+ -- --=[ 927 exploits - 499 auxiliary - 151 post
+ -- --=[ 251 payloads - 28 encoders - 8 nops

msf >

You need to run this in order to install json:
gem install json

RubyGems is a sophisticated package manager for Ruby.  This is a
basic help message containing pointers to more information.

  Usage:
    gem -h/--help
    gem -v/--version
    gem command [arguments...] [options...]

  Examples:
    gem install rake
    gem list --local
    gem build package.gemspec
    gem help install

  Further help:
    gem help commands            list all 'gem' commands
    gem help examples            show some examples of usage
    gem help platforms           show information about platforms
    gem help <COMMAND>           show help on COMMAND
                                   (e.g. 'gem help install')
    gem server                   present a web page at
                                 http://localhost:8808/
                                 with info about installed gems
  Further information:
    http://rubygems.rubyforge.org
msf > gem install json
[*] exec: gem install json

Building native extensions.  This could take a while...
Successfully installed json-1.8.3
1 gem installed
Installing ri documentation for json-1.8.3...
Installing RDoc documentation for json-1.8.3...
msf >




zen consultora

Blogger Widgets