sql server search column name in all tables
SELECT COLUMN_NAME AS 'ColumnName'
,TABLE_NAME AS 'TableName'
FROM INFORMATION_SCHEMA.COLUMNS
WHERE COLUMN_NAME LIKE '%MyName%'
ORDER BY TableName
,ColumnName;
sql server search column name in all tables
SELECT COLUMN_NAME AS 'ColumnName'
,TABLE_NAME AS 'TableName'
FROM INFORMATION_SCHEMA.COLUMNS
WHERE COLUMN_NAME LIKE '%MyName%'
ORDER BY TableName
,ColumnName;
sql indexes
CREATE INDEX
Creates an index named ‘idx_test’ on the first_name and surname columns of
the users table. In this instance, duplicate values are allowed.
CREATE INDEX idx_test
ON users (first_name, surname);
CREATE UNIQUE INDEX
Creates an index named ‘idx_test’ on the first_name and surname columns of
the users table. In this instance, duplicate values are allowed.
CREATE UNIQUE INDEX idx_test
ON users (first_name, surname);
DROP INDEX
Creates an index named ‘idx_test’ on the first_name and surname columns of
the users table. In this instance, duplicate values are allowed.
ALTER TABLE users
DROP INDEX idx_test;
how parse table values in golang by table id
import (
"fmt"
"strings"
"github.com/PuerkitoBio/goquery"
)
func Example() {
var clientRequest = &http.Client{
Timeout: 3 * time.Second,
Transport: &http.Transport{
TLSClientConfig: &tls.Config{InsecureSkipVerify: true},
}}
response, err := clientRequest.PostForm(serviceURL, reqBody)
doc, err := goquery.NewDocumentFromReader(response.Body)
if err != nil {
t.Fatal(err)
}
var person []string
j := 0
// this wonderful package is searching into depth so be sure that
your every html elements you search for has same selector.
For Example if i've been doing it like that doc.Find("#ctl00_cphBody_gvDebtors")
There would be only one iteration into Each and this will be the String containing all the info
into this selector apartly example below contains each of td value of the table
And that's wonderful. If I was creator of the package I would write it down in the documentation
more precisely, cause now, no offence, it sucks!..
doc.Find("#ctl00_cphBody_gvDebtors td").Each(func(i int, s *goquery.Selection) {
// For each item found, get the band and title
if j != 0 {
person = append(person, strings.TrimSpace(s.Text()))
}
j++
})
fmt.Println(len(person))
}
func main(){
Example()
}
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us